mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
wayland: Assign frame_callback on window creation.
Fixes a crash when creating and destroying a window without calling SwapWindow.
This commit is contained in:
parent
41e1a2360f
commit
7b239edb83
@ -1136,7 +1136,8 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
|
|||||||
* window isn't visible.
|
* window isn't visible.
|
||||||
*/
|
*/
|
||||||
if (window->flags & SDL_WINDOW_OPENGL) {
|
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||||
wl_callback_add_listener(wl_surface_frame(data->surface), &surface_frame_listener, data);
|
data->frame_callback = wl_surface_frame(data->surface);
|
||||||
|
wl_callback_add_listener(data->frame_callback, &surface_frame_listener, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
||||||
|
Loading…
Reference in New Issue
Block a user