1
0
Эх сурвалжийг харах

frontend-tools: Free xdisplay on Linux auto scene switcher

The xdisplay in the Linux scene switcher was never closed
when OBS exits.
Clayton Groeneveld 5 жил өмнө
parent
commit
13d43e9782

+ 1 - 1
UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp

@@ -27,7 +27,7 @@ Display *disp()
 	return xdisplay;
 }
 
-void cleanupDisplay()
+void CleanupSceneSwitcher()
 {
 	if (!xdisplay)
 		return;

+ 2 - 0
UI/frontend-plugins/frontend-tools/auto-scene-switcher-osx.mm

@@ -41,3 +41,5 @@ void GetCurrentWindowTitle(string &title)
 		}
 	}
 }
+
+void CleanupSceneSwitcher() {}

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

@@ -67,3 +67,5 @@ void GetCurrentWindowTitle(string &title)
 	}
 	GetWindowTitle(window, title);
 }
+
+void CleanupSceneSwitcher() {}

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

@@ -521,6 +521,8 @@ void SwitcherData::Stop()
 
 extern "C" void FreeSceneSwitcher()
 {
+	CleanupSceneSwitcher();
+
 	delete switcher;
 	switcher = nullptr;
 }

+ 1 - 0
UI/frontend-plugins/frontend-tools/auto-scene-switcher.hpp

@@ -45,3 +45,4 @@ public slots:
 
 void GetWindowList(std::vector<std::string> &windows);
 void GetCurrentWindowTitle(std::string &title);
+void CleanupSceneSwitcher();