浏览代码

UI: Force Wayland usage on Ubuntu GNOME

XDG_CURRENT_DESKTOP is set to "ubuntu:GNOME" on Ubuntu custom version of
GNOME.
tytan652 2 年之前
父节点
当前提交
64176daaf4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      UI/obs-app.cpp

+ 1 - 1
UI/obs-app.cpp

@@ -2317,7 +2317,7 @@ static int run_program(fstream &logFile, int argc, char *argv[])
 
 	const char *desktop = getenv("XDG_CURRENT_DESKTOP");
 	const char *session_type = getenv("XDG_SESSION_TYPE");
-	if (session_type && desktop && strcmp(desktop, "GNOME") == 0 &&
+	if (session_type && desktop && strstr(desktop, "GNOME") != nullptr &&
 	    strcmp(session_type, "wayland") == 0)
 		setenv("QT_QPA_PLATFORM", "wayland", false);
 #endif