SDL_DisplayMode now represents physical pixels and has added a display scaling factor

Work in progress on https://github.com/libsdl-org/SDL/issues/7134
This commit is contained in:
Sam Lantinga 2023-01-25 03:36:35 -08:00
parent a1e101e898
commit 6a27188023
21 changed files with 109 additions and 91 deletions

View file

@ -127,11 +127,10 @@ int Emscripten_VideoInit(_THIS)
SDL_DisplayMode mode;
/* Use a fake 32-bpp desktop mode */
SDL_zero(mode);
mode.format = SDL_PIXELFORMAT_RGB888;
emscripten_get_screen_size(&mode.w, &mode.h);
mode.refresh_rate = 0.0f;
mode.driverdata = NULL;
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
return -1;
}