CDVD: Load GZip index location direct from ini.

Stops the Qt game list from putting indexes in the default location when a custom one is used.
This commit is contained in:
refractionpcsx2 2022-06-21 18:26:35 +01:00
parent 8ec736789c
commit e4554fe9ca
1 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,8 @@
#include "gui/StringHelpers.h" #include "gui/StringHelpers.h"
#include "gui/wxDirName.h" #include "gui/wxDirName.h"
#include <wx/stdpaths.h> #include <wx/stdpaths.h>
#else
#include "HostSettings.h"
#endif #endif
#define CLAMP(val, minval, maxval) (std::min(maxval, std::max(minval, val))) #define CLAMP(val, minval, maxval) (std::min(maxval, std::max(minval, val)))
@ -182,10 +184,11 @@ static std::string iso2indexname(const std::string& isoname)
#ifndef PCSX2_CORE #ifndef PCSX2_CORE
std::string appRoot = // TODO: have only one of this in PCSX2. Right now have few... std::string appRoot = // TODO: have only one of this in PCSX2. Right now have few...
StringUtil::wxStringToUTF8String(((wxDirName)(wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath())).ToString()); StringUtil::wxStringToUTF8String(((wxDirName)(wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath())).ToString());
return ApplyTemplate("gzip index", appRoot, EmuConfig.GzipIsoIndexTemplate, isoname, false);
#else #else
const std::string& appRoot = EmuFolders::DataRoot; const std::string& appRoot = EmuFolders::DataRoot;
return ApplyTemplate("gzip index", appRoot, Host::GetBaseStringSettingValue("EmuCore", "GzipIsoIndexTemplate", "$(f).pindex.tmp"), isoname, false);
#endif #endif
return ApplyTemplate("gzip index", appRoot, EmuConfig.GzipIsoIndexTemplate, isoname, false);
} }