Set SDL window as DPI-aware

This works on macOS, Wayland, and a few more esoteric platforms. X11
doesn't have a concept of DPI-awareness. Note that with this flag
SDL_GetWindowSize() isn't guaranteed to return the actual window size.
This commit is contained in:
leo60228 2020-12-31 20:55:57 -05:00 committed by Ethan Lee
parent a32fc4a307
commit d9fff2a8c3
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ void Screen::init(const ScreenSettings& settings)
SDL_CreateWindowAndRenderer(
640,
480,
SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE,
SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI,
&m_window,
&m_renderer
);