Skip to content

Commit

Permalink
Fix DPI scaling issues on Windows (Kenix3#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostlyDark authored Sep 14, 2024
1 parent da9e334 commit 0302eab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/graphic/Fast3D/gfx_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ static void gfx_sdl_init(const char* game_name, const char* gfx_api_name, bool s
window_width = width;
window_height = height;

#if SDL_VERSION_ATLEAST(2, 24, 0)
/* fix DPI scaling issues on Windows */
SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2");
#endif

SDL_Init(SDL_INIT_VIDEO);

SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
Expand Down

0 comments on commit 0302eab

Please sign in to comment.