Skip to content

Commit

Permalink
Add DPI awareness to fix unecessary scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed May 23, 2024
1 parent 0e7cf1c commit 49f8868
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Game/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ int SDL_main(int argc, char *argv[])
if (sdlresult < 0) {
ErrH.Abort("Error initializing SDLNet", XERR_CRITICAL, sdlresult, SDLNet_GetError());
}

//Set DPI awarenes
SDL_SetHintWithPriority(SDL_HINT_WINDOWS_DPI_AWARENESS, "system", SDL_HINT_OVERRIDE);
SDL_SetHintWithPriority(SDL_HINT_WINDOWS_DPI_SCALING, "0", SDL_HINT_OVERRIDE);

//Do game content detection
detectGameContent();
Expand Down

0 comments on commit 49f8868

Please sign in to comment.