UI: Replace os_get_config_path with GetConfigPath

This allows the UI to be able to use a custom config path for cases such
as portable mode, where the config path is relative to the executable.
This commit is contained in:
jp9000
2015-06-01 16:42:30 -07:00
parent ea3496e512
commit 4b422d7d23
4 changed files with 35 additions and 24 deletions
+3 -3
View File
@@ -603,7 +603,7 @@ void OBSBasicSettings::LoadThemeList()
QSet<QString> uniqueSet;
string themeDir;
char userThemeDir[512];
int ret = os_get_config_path(userThemeDir, sizeof(userThemeDir),
int ret = GetConfigPath(userThemeDir, sizeof(userThemeDir),
"obs-studio/themes/");
GetDataFilePath("themes/", themeDir);
@@ -959,7 +959,7 @@ OBSPropertiesView *OBSBasicSettings::CreateEncoderPropertyView(
OBSPropertiesView *view;
char encoderJsonPath[512];
int ret = os_get_config_path(encoderJsonPath, sizeof(encoderJsonPath),
int ret = GetConfigPath(encoderJsonPath, sizeof(encoderJsonPath),
path);
if (ret > 0) {
BPtr<char> jsonData = os_quick_read_utf8_file(encoderJsonPath);
@@ -1860,7 +1860,7 @@ static void WriteJsonData(OBSPropertiesView *view, const char *path)
if (!view || !WidgetChanged(view))
return;
int ret = os_get_config_path(full_path, sizeof(full_path), path);
int ret = GetConfigPath(full_path, sizeof(full_path), path);
if (ret > 0) {
obs_data_t *settings = view->GetSettings();
if (settings) {