Closed JeWe37 closed 6 years ago
No worries and thanks for letting me know about the issues!
I added "XCloseDisplay(dpy);" in the cursor position check to avoid the segfault.
I am very inexperienced with CMake as well so any suggestions are welcome. I am building OBS when I building the plugin. I moved the sources of this plugin to the the frontend-plugins folder in the OBS sources ("obs-studio/UI/frontend-plugins/SceneSwitcher"). I then edited the CMakeLists.txt in the frontend-plugins folder to include the SceneSwitcher sources directory by adding the line "add_subdirectory(SceneSwitcher)". So the final file looks like this:
add_subdirectory(frontend-tools) add_subdirectory(SceneSwitcher)
Then I switch back to my OSB build directory and call make. (after previously calling cmake)
I am sorry, I accidentally clicked finish too soon. (Let me just mention I have no experience with CMake nor OBS Plugin dev) Regardless, as it turns out your Linux version of the plugin has the problem that you forgot to close the XDisplay in your getCursorPos function in advanced-scene-switcher-nix.cpp crashing OBS after some time with a segfault and the error "Maximum number of clients reached". I was not able to test that properly as that your build system appears to be fairly broken on Linux as well, eventhough I managed to get it to compile properly by finding the QT package, getting the OBS-Studio source and using its headers and CMake Helpers and changing the libobs to just obs which the library is called on my system, when I moved the .so into the plugin folder nothing showed up although it had when I had used the precompiled bins.