Skip to content

SDL_SetWindowFullscreen fails with 'Couldn't find any matching video modes' when using dummy driver #458

@penguinpee

Description

@penguinpee

This is one of the last issues I'm experiencing with the testsuite from py-sdl/py-sdl2 in Fedora after switching to sdl2-compat1.

I'm using sdl2-compat 2.32.54 with py-sdl/py-sdl2/pull/280 applied as a patch on top. Running the testsuite with the dummy video driver (SDL_VIDEODRIVER=dummy) test_SDL_SetWindowFullscreen fails.

I modified the test a little in order to get the actual error message:

--- a/sdl2/test/video_test.py
+++ b/sdl2/test/video_test.py
@@ -646,10 +646,10 @@ def test_SDL_SetWindowFullscreen(with_sdl):
     is_fullscreen = sdl2.SDL_WINDOW_FULLSCREEN
     for flag in flags:
         window = sdl2.SDL_CreateWindow(b"Test", 0, 0, 1024, 768, flag)
-        sdl2.SDL_SetWindowFullscreen(window, True)
+        assert sdl2.SDL_SetWindowFullscreen(window, True) == 0, _check_error_msg()
         flags = sdl2.SDL_GetWindowFlags(window)
         assert flags & is_fullscreen == is_fullscreen
-        sdl2.SDL_SetWindowFullscreen(window, False)
+        assert sdl2.SDL_SetWindowFullscreen(window, False) == 0, _check_error_msg()
         flags = sdl2.SDL_GetWindowFlags(window)
         assert flags & is_fullscreen != is_fullscreen
         sdl2.SDL_DestroyWindow(window)

With that the test reports: "AssertionError: Couldn't find any matching video modes". I also tried the same test outside our build environment on X11 and Wayland. Both work.

With SDL2 2.30.11 the test also passes with the dummy driver.

Footnotes

  1. Thanks for fixing the majority of issues reported downstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions