-
Notifications
You must be signed in to change notification settings - Fork 44
Closed as not planned
Closed as not planned
Copy link
Description
The py-sdl2 test_SDL_GetSetWindowPosition test fails when running with sdl2-compat, and using the wayland video driver.
Equivalent C code:
#define SDL_ASSERT_LEVEL 3
#include <SDL2/SDL.h>
int main(int argc, char *argv[]) {
(void) argc;
(void) argv;
SDL_SetHintWithPriority(SDL_HINT_VIDEODRIVER, "wayland", SDL_HINT_OVERRIDE);
SDL_setenv("SDL_ASSERT", "ignore", 0);
int result = SDL_Init(SDL_INIT_VIDEO);
SDL_assert(result == 0);
SDL_Window *window = SDL_CreateWindow("hello", 10, 200, 10, 10, 0);
SDL_assert(window != NULL);
SDL_assert(SDL_strcmp("wayland", SDL_GetCurrentVideoDriver()) == 0);
int px, py;
SDL_GetWindowPosition(window, &px, &py);
SDL_assert(px == 10);
SDL_assert(py == 200);
SDL_SetWindowPosition(window, 0, 150);
SDL_PumpEvents();
SDL_GetWindowPosition(window, &px, &py);
SDL_assert(px == 0);
SDL_assert(py == 150);
SDL_SetWindowPosition(window, 480, 320);
SDL_PumpEvents();
SDL_GetWindowPosition(window, &px, &py);
SDL_assert(px == 480);
SDL_assert(py == 320);
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}SDL2 output is empty.
sdl2-compat output is:
WARN:
Assertion failure at main (a.c:22), triggered 1 time:
'px == 0'
WARN:
Assertion failure at main (a.c:23), triggered 1 time:
'py == 150'
WARN:
Assertion failure at main (a.c:29), triggered 1 time:
'px == 480'
WARN:
Assertion failure at main (a.c:30), triggered 1 time:
'py == 320'
Metadata
Metadata
Assignees
Labels
No labels