From 1512c6bd9cb71eb655599a9632d9ae9d43c60146 Mon Sep 17 00:00:00 2001 From: BreakPoints Date: Sat, 17 Jun 2023 17:40:25 +0100 Subject: [PATCH] sdl: Directly use Windows DPI scaling hint, not SDL (#2730) Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com> --- game/system/hid/display_manager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/system/hid/display_manager.cpp b/game/system/hid/display_manager.cpp index 3c5b812b84..20ecb80dd4 100644 --- a/game/system/hid/display_manager.cpp +++ b/game/system/hid/display_manager.cpp @@ -7,8 +7,10 @@ DisplayManager::DisplayManager(SDL_Window* window) : m_window(window), m_selected_fullscreen_display_id(0) { - // SDL hint to disable OS level forced scaling and allow native resolution at non 100% scales - SDL_SetHint("SDL_WINDOWS_DPI_SCALING", "true"); +#ifdef _WIN32 + // Windows hint to disable OS level forced scaling and allow native resolution at non 100% scales + SetProcessDPIAware(); +#endif update_curr_display_info(); update_video_modes(); // Load display settings from a file