mirror of https://github.com/PCSX2/pcsx2.git
Config: Move gzip index template to base config
This commit is contained in:
parent
15365c8702
commit
307feefa87
|
@ -16,7 +16,7 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include <fstream>
|
||||
#include <wx/stdpaths.h>
|
||||
#include "gui/AppConfig.h"
|
||||
#include "Config.h"
|
||||
#include "ChunksCache.h"
|
||||
#include "CompressedFileReaderUtils.h"
|
||||
#include "GzippedFileReader.h"
|
||||
|
@ -185,7 +185,7 @@ static wxString iso2indexname(const wxString& isoname)
|
|||
wxDirName appRoot = // TODO: have only one of this in PCSX2. Right now have few...
|
||||
(wxDirName)(wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath());
|
||||
//TestTemplate(appRoot, isoname, false);
|
||||
return ApplyTemplate(L"gzip index", appRoot, g_Conf->GzipIsoIndexTemplate, isoname, false);
|
||||
return ApplyTemplate(L"gzip index", appRoot, EmuConfig.GzipIsoIndexTemplate, isoname, false);
|
||||
}
|
||||
|
||||
GzippedFileReader::GzippedFileReader(void)
|
||||
|
|
|
@ -567,6 +567,8 @@ struct Pcsx2Config
|
|||
FolderOptions Folders;
|
||||
FilenameOptions BaseFilenames;
|
||||
|
||||
wxString GzipIsoIndexTemplate; // for quick-access index with gzipped ISO
|
||||
|
||||
// Set at runtime, not loaded from config.
|
||||
CDVD_SourceType CdvdSource;
|
||||
wxString CurrentIso;
|
||||
|
|
|
@ -20,7 +20,11 @@
|
|||
#include "common/IniInterface.h"
|
||||
#include "Config.h"
|
||||
#include "GS.h"
|
||||
#include "gui/GSFrame.h"
|
||||
#include "CDVD/CDVDaccess.h"
|
||||
|
||||
#ifndef PCSX2_CORE
|
||||
#include "gui/AppConfig.h"
|
||||
#endif
|
||||
|
||||
void TraceLogFilters::LoadSave( IniInterface& ini )
|
||||
{
|
||||
|
@ -439,7 +443,11 @@ void Pcsx2Config::FilenameOptions::LoadSave(IniInterface& ini)
|
|||
//when saving in portable mode, we just save the non-full-path filename
|
||||
// --> on load they'll be initialized with default (relative) paths (works for bios)
|
||||
//note: this will break if converting from install to portable, and custom folders are used. We can live with that.
|
||||
#ifndef PCSX2_CORE
|
||||
bool needRelativeName = ini.IsSaving() && IsPortable();
|
||||
#else
|
||||
bool needRelativeName = ini.IsSaving();
|
||||
#endif
|
||||
|
||||
if (needRelativeName)
|
||||
{
|
||||
|
@ -485,6 +493,8 @@ Pcsx2Config::Pcsx2Config()
|
|||
EnablePatches = true;
|
||||
BackupSavestate = true;
|
||||
|
||||
GzipIsoIndexTemplate = L"$(f).pindex.tmp";
|
||||
|
||||
CdvdSource = CDVD_SourceType::Iso;
|
||||
}
|
||||
|
||||
|
@ -522,6 +532,8 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
|
|||
Debugger .LoadSave( ini );
|
||||
Trace .LoadSave( ini );
|
||||
|
||||
IniEntry(GzipIsoIndexTemplate);
|
||||
|
||||
// For now, this in the derived config for backwards ini compatibility.
|
||||
#ifdef PCSX2_CORE
|
||||
BaseFilenames.LoadSave(ini);
|
||||
|
@ -577,6 +589,8 @@ void Pcsx2Config::CopyConfig(const Pcsx2Config& cfg)
|
|||
BaseFilenames = cfg.BaseFilenames;
|
||||
Framerate = cfg.Framerate;
|
||||
|
||||
GzipIsoIndexTemplate = cfg.GzipIsoIndexTemplate;
|
||||
|
||||
CdvdVerboseReads = cfg.CdvdVerboseReads;
|
||||
CdvdDumpBlocks = cfg.CdvdDumpBlocks;
|
||||
CdvdShareWrite = cfg.CdvdShareWrite;
|
||||
|
|
|
@ -479,8 +479,6 @@ AppConfig::AppConfig()
|
|||
// Folder memory card is autodetected later.
|
||||
Mcd[slot].Type = MemoryCardType::MemoryCard_File;
|
||||
}
|
||||
|
||||
GzipIsoIndexTemplate = L"$(f).pindex.tmp";
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -566,7 +564,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
|
|||
ini.EnumEntry( L"LanguageId", LanguageId, NULL, LanguageId );
|
||||
IniEntry( LanguageCode );
|
||||
IniEntry( RecentIsoCount );
|
||||
IniEntry( GzipIsoIndexTemplate );
|
||||
ini.Entry(wxT("GzipIsoIndexTemplate"), EmuConfig.GzipIsoIndexTemplate, EmuConfig.GzipIsoIndexTemplate);
|
||||
IniEntry( Listbook_ImageSize );
|
||||
IniEntry( Toolbar_ImageSize );
|
||||
IniEntry( Toolbar_ShowLabels );
|
||||
|
|
|
@ -286,7 +286,6 @@ public:
|
|||
// Memorycard options - first 2 are default slots, last 6 are multitap 1 and 2
|
||||
// slots (3 each)
|
||||
McdOptions Mcd[8];
|
||||
wxString GzipIsoIndexTemplate; // for quick-access index with gzipped ISO
|
||||
|
||||
ConsoleLogOptions ProgLogBox;
|
||||
FolderOptions Folders;
|
||||
|
|
Loading…
Reference in New Issue