diff --git a/UnleashedRecomp/CMakeLists.txt b/UnleashedRecomp/CMakeLists.txt index 41285d4..09012d7 100644 --- a/UnleashedRecomp/CMakeLists.txt +++ b/UnleashedRecomp/CMakeLists.txt @@ -351,10 +351,12 @@ file(CHMOD ${DIRECTX_DXC_TOOL} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) if (WIN32) target_link_libraries(UnleashedRecomp PRIVATE - comctl32 - ntdll - winmm + comctl32 + dwmapi + ntdll + Shcore Synchronization + winmm ) endif() diff --git a/UnleashedRecomp/ui/game_window.cpp b/UnleashedRecomp/ui/game_window.cpp index cd6fac9..1297c3b 100644 --- a/UnleashedRecomp/ui/game_window.cpp +++ b/UnleashedRecomp/ui/game_window.cpp @@ -9,7 +9,7 @@ #if _WIN32 #include -#pragma comment(lib, "dwmapi.lib") +#include #endif #include @@ -184,7 +184,7 @@ void GameWindow::Init(const char* sdlVideoDriver) SDL_AddEventWatch(Window_OnSDLEvent, s_pWindow); #ifdef _WIN32 - SetProcessDPIAware(); + SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); #endif Config::WindowSize.LockCallback = [](ConfigDef* def) @@ -442,7 +442,7 @@ void GameWindow::ResetDimensions() uint32_t GameWindow::GetWindowFlags() { - uint32_t flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE; + uint32_t flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; if (Config::WindowState == EWindowState::Maximised) flags |= SDL_WINDOW_MAXIMIZED;