Enable high dpi support
Use high DPI if available. Note that on Mac OS X, setting this flag is not sufficient: > On Apple's OS X you must set the NSHighResolutionCapable Info.plist > property to YES, otherwise you will not receive a High DPI OpenGL > display. <https://wiki.libsdl.org/SDL_CreateWindow#flags>
This commit is contained in:
parent
8ace3d1781
commit
38b56f552e
1 changed files with 2 additions and 1 deletions
|
@ -141,7 +141,8 @@ SDL_bool screen_init_rendering(struct screen *screen, const char *device_name, s
|
||||||
|
|
||||||
struct size window_size = get_initial_optimal_size(frame_size);
|
struct size window_size = get_initial_optimal_size(frame_size);
|
||||||
screen->window = SDL_CreateWindow(device_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
screen->window = SDL_CreateWindow(device_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||||
window_size.width, window_size.height, SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE);
|
window_size.width, window_size.height,
|
||||||
|
SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||||
if (!screen->window) {
|
if (!screen->window) {
|
||||||
LOGC("Could not create window: %s", SDL_GetError());
|
LOGC("Could not create window: %s", SDL_GetError());
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
|
|
Loading…
Reference in a new issue