Skip to content

Commit 8ab4729

Browse files
Fixes issue in pre-obs-31, where file type suffix is not added to filename in .ini file.
1 parent 4aabc3f commit 8ab4729

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/util.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,19 @@ std::string get_current_scene_collection_filename()
112112
{
113113
int v = get_major_version();
114114
if (v < 31) { // Get the filename from global.ini
115+
// also in pre-31, the filename in the config file did not
116+
// have a filetype suffix.
117+
// so we need to add .json
115118
#pragma warning (disable : 4996)
116119
std::string file_name =
117120
config_get_string(obs_frontend_get_global_config(), "Basic",
118121
"SceneCollectionFile");
119122
#pragma warning (default : 4996)
123+
file_name += ".json";
120124
return file_name;
121-
}
122-
else { // get the filename from user.ini
125+
} else { // get the filename from user.ini
126+
// in 31+ the filename stored in user.ini *does* have a filetype
127+
// suffix.
123128
void* obs_frontend_dll = os_dlopen("obs-frontend-api.dll");
124129
void* sym = os_dlsym(obs_frontend_dll, "obs_frontend_get_user_config");
125130
config_t* (*get_user_config)() = (config_t* (*)())sym;

0 commit comments

Comments
 (0)