diff --git a/src/FreeSurroundSettings.cpp b/src/FreeSurroundSettings.cpp index 735bb94..82fb498 100644 --- a/src/FreeSurroundSettings.cpp +++ b/src/FreeSurroundSettings.cpp @@ -32,7 +32,7 @@ using namespace ADDON; std::string GetSettingsFile() { - string settingFile = g_strAddonPath; + string settingFile = g_strUserPath; if (settingFile.at(settingFile.size() - 1) == '\\' || settingFile.at(settingFile.size() - 1) == '/') settingFile.append("ADSPFreeSurrAddonSettings.xml"); diff --git a/src/addon.cpp b/src/addon.cpp index fa143d2..3603cfa 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -33,6 +33,10 @@ using namespace ADDON; #define snprintf _snprintf #endif +#if defined(TARGET_WINDOWS) + #undef CreateDirectory +#endif + /* User adjustable settings are saved here. * Default values are defined inside addon.h @@ -91,6 +95,12 @@ ADDON_STATUS ADDON_Create(void* hdl, void* props) g_strUserPath = adspprops->strUserPath; g_strAddonPath = adspprops->strAddonPath; + // create addon user path + if (!KODI->DirectoryExists(g_strUserPath.c_str())) + { + KODI->CreateDirectory(g_strUserPath.c_str()); + } + for (int i = 0; i < AE_DSP_STREAM_MAX_STREAMS; ++i) g_usedDSPs[i] = NULL;