Skip to content
Snippets Groups Projects
Commit 35b22413 authored by Timothee Besset's avatar Timothee Besset
Browse files

fix wayland startup

parent 9b95f639
Branches
Tags
No related merge requests found
......@@ -3104,6 +3104,10 @@ class ImGui_SDL2_Viewport:
def setup(self):
self.report_versions()
if platform.system() == 'Linux':
# Fix startup on wayland - looks like this needs to be set before init
sdl2.SDL_SetHint(sdl2.SDL_HINT_VIDEODRIVER, b"wayland,x11")
if sdl2.SDL_Init(sdl2.SDL_INIT_EVERYTHING) < 0:
raise Exception('SDL_Init failed: %d'.format(sdl2.SDL_GetError()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment