Default to Wayland if possible in ImGui backend
Some checks failed
Build / download-system-deps (push) Successful in 1m25s
Build / build-gentoo (push) Successful in 2m45s
Build / get-source-code (push) Successful in 4m24s
Build / build-deb (push) Failing after 2m39s
Build / build-appimage (push) Successful in 1m22s
Build / build-android (push) Failing after 16s
Build / build-windows (push) Failing after 4m16s

This commit is contained in:
Zachary Hall 2024-12-29 07:48:57 -08:00
parent c6ec09cd14
commit 3fd1a3ca42

View file

@ -861,6 +861,9 @@ void ImGuiUIBackend::QuitHandler() {
int ImGuiUIBackend::run(std::vector<std::string> realArgs, int argc, char** argv)
{
SDL_setenv("SDL_VIDEO_X11_WMCLASS", "looper", 1);
if (SDL_getenv("WAYLAND_DISPLAY")) {
SDL_setenv("SDL_VIDEODRIVER", "wayland", 0);
}
int possible_error = UIBackend::run(realArgs, argc, argv);
if (possible_error != 0) {
return possible_error;