Skip to content

Dose sdl.SetHint(Sdl.HintWindowsDpiAwareness, "system"); not work? #2317

Closed Answered by Cn-mjt44
Cn-mjt44 asked this question in Q&A
Discussion options

You must be logged in to vote

By checking SDL2 c code and make few test, I found the sloution.

sdl.SetHint(Sdl.HintWindowsDpiAwareness, "permonitor");
sdl.VideoInit(null as string);

Just invoke SDL_VideoInit() before create window. it looks like some kind of bug on SDL2 that SDL_Init() and SDL_InitSubSystem() not invoke SDL_VideoInit(). It probably came from SDL2 compiltion issues.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Cn-mjt44
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Cn-mjt44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2316 on October 29, 2024 11:25.