testcontroller: create window with high pixel density

This improves the picture quality when running on an iPhone.
This commit is contained in:
Sam Lantinga 2025-02-22 09:02:01 -08:00
parent 75bbcbf87b
commit bc85c55350

View file

@ -2101,7 +2101,7 @@ SDL_AppResult SDLCALL SDL_AppInit(void **appstate, int argc, char *argv[])
} }
screen_width = (int)SDL_ceilf(SCREEN_WIDTH * content_scale); screen_width = (int)SDL_ceilf(SCREEN_WIDTH * content_scale);
screen_height = (int)SDL_ceilf(SCREEN_HEIGHT * content_scale); screen_height = (int)SDL_ceilf(SCREEN_HEIGHT * content_scale);
window = SDL_CreateWindow("SDL Controller Test", screen_width, screen_height, 0); window = SDL_CreateWindow("SDL Controller Test", screen_width, screen_height, SDL_WINDOW_HIGH_PIXEL_DENSITY);
if (!window) { if (!window) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s", SDL_GetError()); SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s", SDL_GetError());
return SDL_APP_FAILURE; return SDL_APP_FAILURE;