From 941e0541572efba1a57e664a12228fe686aa5720 Mon Sep 17 00:00:00 2001 From: Rosalie Date: Wed, 16 Feb 2022 08:33:28 +0100 Subject: [PATCH] GLideNUI: copy M64P_GLIDENUI fix to Config_LoadConfig() aswell --- src/GLideNUI/Config_GLideNUI.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/GLideNUI/Config_GLideNUI.cpp b/src/GLideNUI/Config_GLideNUI.cpp index e815f5e3..24803747 100644 --- a/src/GLideNUI/Config_GLideNUI.cpp +++ b/src/GLideNUI/Config_GLideNUI.cpp @@ -42,6 +42,17 @@ void Config_LoadConfig() { wchar_t strIniFolderPath[PLUGIN_PATH_SIZE]; api().FindPluginPath(strIniFolderPath); + +#ifdef M64P_GLIDENUI + wchar_t strConfigFolderPath[PLUGIN_PATH_SIZE]; + api().GetUserConfigPath(strConfigFolderPath); + + if (!IsPathWriteable(strIniFolderPath)) { + CopyConfigFiles(strIniFolderPath, strConfigFolderPath); + api().GetUserConfigPath(strIniFolderPath); + } +#endif // M64P_GLIDENUI + LoadConfig(strIniFolderPath); if (config.generalEmulation.enableCustomSettings != 0) LoadCustomRomSettings(strIniFolderPath, RSP.romname);