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:
parent
a1e101e898
commit
6a27188023
21 changed files with 109 additions and 91 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue