fix(video): set per-monitor v2 DPI awareness on Windows

Avoid Windows DPI virtualization so SDL, the drawable and the swapchain use physical pixels.

Co-Authored-By: saulo benigno <saulobenigno@gmail.com>
This commit is contained in:
hamb3r 2026-10-05 03:08:42 +03:00
parent 9651ec9a92
commit 3b2edec285
1 changed files with 1 additions and 0 deletions

View File

@ -199,6 +199,7 @@ VideoOutDriver& VideoOutDriver::Get() {
}
VideoOutDriver::VideoOutDriver() {
SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2");
if (SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) {
throw std::runtime_error(std::string("SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: ") + SDL_GetError());
}