testautomation_video: Don't do fullscreen toggling tests on Emscripten.
SDL_SetWindowFullscreen now reports failure while a fullscreen transition is already in progress on Emscripten, upsetting the test when it tries to come back to windowed mode, but testautomation will never give correct results here even when we fix the backend to queue pending reversal requests, because you'll have to return to the Emscripten mainloop before these state changes will occur. It's just sort of luck this specific test passed before on this target.
This commit is contained in:
@@ -1723,7 +1723,8 @@ static int SDLCALL video_setWindowCenteredOnDisplay(void *arg)
|
||||
int result;
|
||||
SDL_Rect display0, display1;
|
||||
const char *video_driver = SDL_GetCurrentVideoDriver();
|
||||
bool video_driver_is_wayland = SDL_strcmp(video_driver, "wayland") == 0;
|
||||
const bool video_driver_is_wayland = SDL_strcmp(video_driver, "wayland") == 0;
|
||||
const bool video_driver_is_emscripten = SDL_strcmp(video_driver, "emscripten") == 0;
|
||||
|
||||
displays = SDL_GetDisplays(&displayNum);
|
||||
if (displays) {
|
||||
@@ -1816,6 +1817,9 @@ static int SDLCALL video_setWindowCenteredOnDisplay(void *arg)
|
||||
SDLTest_Log("Skipping window position validation: %s driver does not support window positioning", video_driver);
|
||||
}
|
||||
|
||||
if (video_driver_is_emscripten) {
|
||||
SDLTest_Log("Skipping fullscreen checks on Emscripten: can't toggle fullscreen without returning to mainloop.");
|
||||
} else {
|
||||
/* Enter fullscreen desktop */
|
||||
SDL_SetWindowPosition(window, x, y);
|
||||
result = SDL_SetWindowFullscreen(window, true);
|
||||
@@ -1858,6 +1862,7 @@ static int SDLCALL video_setWindowCenteredOnDisplay(void *arg)
|
||||
}
|
||||
|
||||
/* Leave fullscreen desktop */
|
||||
|
||||
result = SDL_SetWindowFullscreen(window, false);
|
||||
SDLTest_AssertCheck(result == true, "Verify return value; expected: true, got: %d", result);
|
||||
|
||||
@@ -1887,6 +1892,7 @@ static int SDLCALL video_setWindowCenteredOnDisplay(void *arg)
|
||||
} else {
|
||||
SDLTest_Log("Skipping window position validation: %s driver does not support window positioning", video_driver);
|
||||
}
|
||||
}
|
||||
|
||||
/* Center on display yVariation, and check window properties */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user