From fbee0b86bf659b469cc0676055cf77e30a31fb4d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 14 Oct 2023 03:23:33 +0200 Subject: [PATCH] video: verify SDL_GetNumVideoDisplays is succesful --- test/testautomation_video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/testautomation_video.c b/test/testautomation_video.c index 1e78039e4..dd8f1c5c2 100644 --- a/test/testautomation_video.c +++ b/test/testautomation_video.c @@ -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);