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:
parent
9651ec9a92
commit
3b2edec285
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue