Selaa lähdekoodia

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 vuosi sitten
vanhempi
sitoutus
5e5865b716
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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()
 {
+#if !defined(__APPLE__) && !defined(_WIN32)
+	if (QApplication::platformName().contains("wayland"))
+		return;
+#endif
+
 	QAction *action = (QAction *)obs_frontend_add_tools_menu_qaction(
 		obs_module_text("SceneSwitcher"));