You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Wayland: Fix engine stalls wihle waiting frames
There were two edge cases in the frame waiting logic (aka manual frame throttling or emulated vsync) which would cause the editor to stall in one way or another: 1. Waiting right after starting the editor would cause a deadlock between both threads until something happened in the Wayland event queue, in turn unblocking the Wayland thread and kickstartin the whole thing; 2. Starting the editor (and probably other long-loading stuff) without low consumption mode would suspend the window and never commit its surfaces, thus never signaling the compositor that we want frame events.
This commit is contained in:
@@ -1317,6 +1317,10 @@ void DisplayServerWayland::process_events() {
|
||||
DEBUG_LOG_WAYLAND("Unsuspending from timeout.");
|
||||
}
|
||||
}
|
||||
|
||||
// Since we're not rendering, nothing is committing the windows'
|
||||
// surfaces. We have to do it ourselves.
|
||||
wayland_thread.commit_surfaces();
|
||||
}
|
||||
|
||||
#ifdef DBUS_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user