Fixed checking the return values of SDL_AddBasicVideoDisplay() and SDL_AddVideoDisplay()
Also fixed Wayland and Windows usage of SDL_DelVideoDisplay() https://github.com/libsdl-org/SDL/issues/7192
This commit is contained in:
parent
1ffc09c6e6
commit
b07f8e987b
14 changed files with 36 additions and 22 deletions
|
@ -132,7 +132,7 @@ int Emscripten_VideoInit(_THIS)
|
|||
emscripten_get_screen_size(&mode.screen_w, &mode.screen_h);
|
||||
mode.display_scale = emscripten_get_device_pixel_ratio();
|
||||
|
||||
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
|
||||
if (SDL_AddBasicVideoDisplay(&mode) == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue