mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 18:55:42 +00:00
video: verify SDL_GetNumVideoDisplays is succesful
This commit is contained in:
parent
880c69392a
commit
fbee0b86bf
|
@ -2017,6 +2017,11 @@ int video_setWindowCenteredOnDisplay(void *arg)
|
|||
SDL_Rect display0, display1;
|
||||
|
||||
displayNum = SDL_GetNumVideoDisplays();
|
||||
SDLTest_AssertPass("SDL_GetNumVideoDisplays()");
|
||||
SDLTest_AssertCheck(displayNum >= 1, "Validate result (current: %d, expected >= 1)", displayNum);
|
||||
if (displayNum <= 0) {
|
||||
return TEST_ABORTED;
|
||||
}
|
||||
|
||||
/* Get display bounds */
|
||||
result = SDL_GetDisplayBounds(0 % displayNum, &display0);
|
||||
|
|
Loading…
Reference in a new issue