浏览代码

frontend-tools: Avoid initializing the scene switcher on Wayland

The Linux implementation of the automatic scene switcher is X11-only and
the design itself of the feature is incompatible with how Wayland works.
tytan652 1 年之前
父节点
当前提交
5e5865b716
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp

+ 5 - 0
UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp

@@ -513,6 +513,11 @@ static void OBSEvent(enum obs_frontend_event event, void *)
 
 
 extern "C" void InitSceneSwitcher()
 extern "C" void InitSceneSwitcher()
 {
 {
+#if !defined(__APPLE__) && !defined(_WIN32)
+	if (QApplication::platformName().contains("wayland"))
+		return;
+#endif
+
 	QAction *action = (QAction *)obs_frontend_add_tools_menu_qaction(
 	QAction *action = (QAction *)obs_frontend_add_tools_menu_qaction(
 		obs_module_text("SceneSwitcher"));
 		obs_module_text("SceneSwitcher"));