@@ -42,6 +42,7 @@ std::string OBS_currentSceneCollectio
4242bool useOBS_configFiles = false ;
4343bool isOBS_installedValue;
4444std::wstring_convert<std::codecvt_utf8_utf16<wchar_t >> converter;
45+ std::string slobs_plugin;
4546
4647std::string g_moduleDirectory = " " ;
4748
@@ -427,14 +428,16 @@ void OBS_API::OBS_API_initAPI(
427428 }
428429 pathConfigDirectory = args[0 ].value_str .c_str ();
429430 appdata_path = args[0 ].value_str .c_str ();
430- appdata_path += " /node-obs/" ;
431431
432432 /* libobs will use three methods of finding data files:
433433 * 1. ${CWD}/data/libobs <- This doesn't work for us
434434 * 2. ${OBS_DATA_PATH}/libobs <- This works but is inflexible
435435 * 3. getenv(OBS_DATA_PATH) + /libobs <- Can be set anywhere
436436 * on the cli, in the frontend, or the backend. */
437437 obs_add_data_path ((g_moduleDirectory + " /libobs/data/libobs/" ).c_str ());
438+ slobs_plugin = appdata_path.substr (0 , appdata_path.size () - 14 );
439+ slobs_plugin.append (" /slobs-plugin" );
440+ obs_add_data_path ((slobs_plugin + " /data/" ).c_str ());
438441
439442 std::vector<char > userData = std::vector<char >(1024 );
440443 os_get_config_path (userData.data (), userData.capacity () - 1 , " slobs-client/plugin_config" );
@@ -443,7 +446,7 @@ void OBS_API::OBS_API_initAPI(
443446 /* Logging */
444447 string filename = GenerateTimeDateFilename (" txt" );
445448 string log_path = appdata_path;
446- log_path.append (" /logs/" );
449+ log_path.append (" /node-obs/ logs/" );
447450
448451 /* Make sure the path is created
449452 before attempting to make a file there. */
@@ -818,9 +821,10 @@ void OBS_API::openAllModules(void)
818821{
819822 OBS_service::resetVideoContext (NULL );
820823
821- std::string plugins_paths[] = {g_moduleDirectory + " /obs-plugins/64bit" , g_moduleDirectory + " /obs-plugins" };
824+ std::string plugins_paths[] = {g_moduleDirectory + " /obs-plugins/64bit" , g_moduleDirectory + " /obs-plugins" , slobs_plugin + " /obs-plugins " };
822825
823- std::string plugins_data_paths[] = {g_moduleDirectory + " /data/obs-plugins" , plugins_data_paths[0 ]};
826+ std::string plugins_data_paths[] = {
827+ g_moduleDirectory + " /data/obs-plugins" , plugins_data_paths[0 ], slobs_plugin + " /data/obs-plugins" };
824828
825829 size_t num_paths = sizeof (plugins_paths) / sizeof (plugins_paths[0 ]);
826830
0 commit comments