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:
Sam Lantinga
2023-01-29 21:57:30 -08:00
parent 1ffc09c6e6
commit b07f8e987b
14 changed files with 36 additions and 22 deletions

View File

@@ -359,8 +359,9 @@ int UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event)
}
display.driverdata = data;
SDL_AddVideoDisplay(&display, send_event);
if (SDL_AddVideoDisplay(&display, send_event) == 0) {
return -1;
}
return 0;
}