mirror of https://github.com/PCSX2/pcsx2.git
Config: Move Folders/BaseFilenames to base config
This commit is contained in:
parent
3f265b3f1c
commit
77a890ff4a
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "IopCommon.h"
|
#include "IopCommon.h"
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -94,7 +93,7 @@ static int mg_BIToffset(u8* buffer)
|
||||||
|
|
||||||
static void cdvdGetMechaVer(u8* ver)
|
static void cdvdGetMechaVer(u8* ver)
|
||||||
{
|
{
|
||||||
wxFileName mecfile(EmuConfig.BiosFilename);
|
wxFileName mecfile(EmuConfig.FullpathToBios());
|
||||||
mecfile.SetExt(L"mec");
|
mecfile.SetExt(L"mec");
|
||||||
const wxString fname(mecfile.GetFullPath());
|
const wxString fname(mecfile.GetFullPath());
|
||||||
|
|
||||||
|
@ -168,7 +167,7 @@ static void cdvdCreateNewNVM(const wxString& filename)
|
||||||
// be created for some reason.
|
// be created for some reason.
|
||||||
static void cdvdNVM(u8* buffer, int offset, size_t bytes, bool read)
|
static void cdvdNVM(u8* buffer, int offset, size_t bytes, bool read)
|
||||||
{
|
{
|
||||||
wxFileName nvmfile(EmuConfig.BiosFilename);
|
wxFileName nvmfile(EmuConfig.FullpathToBios());
|
||||||
nvmfile.SetExt(L"nvm");
|
nvmfile.SetExt(L"nvm");
|
||||||
const wxString fname(nvmfile.GetFullPath());
|
const wxString fname(nvmfile.GetFullPath());
|
||||||
|
|
||||||
|
@ -587,7 +586,6 @@ s32 cdvdCtrlTrayClose()
|
||||||
cdvd.TrayTimeout = 0; // Reset so it can't get closed twice by cdvdVsync()
|
cdvd.TrayTimeout = 0; // Reset so it can't get closed twice by cdvdVsync()
|
||||||
|
|
||||||
cdvdDetectDisk();
|
cdvdDetectDisk();
|
||||||
GetCoreThread().ApplySettings(g_Conf->EmuOptions);
|
|
||||||
|
|
||||||
return 0; // needs to be 0 for success according to homebrew test "CDVD"
|
return 0; // needs to be 0 for success according to homebrew test "CDVD"
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "CDVDisoReader.h"
|
#include "CDVDisoReader.h"
|
||||||
|
|
||||||
#include "DebugTools/SymbolMap.h"
|
#include "DebugTools/SymbolMap.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
|
|
||||||
CDVD_API* CDVD = NULL;
|
CDVD_API* CDVD = NULL;
|
||||||
|
|
||||||
|
@ -388,10 +388,10 @@ bool DoCDVDopen()
|
||||||
else if (somepick.IsEmpty())
|
else if (somepick.IsEmpty())
|
||||||
somepick = L"Untitled";
|
somepick = L"Untitled";
|
||||||
|
|
||||||
if (g_Conf->CurrentBlockdump.IsEmpty())
|
if (EmuConfig.CurrentBlockdump.IsEmpty())
|
||||||
g_Conf->CurrentBlockdump = wxGetCwd();
|
EmuConfig.CurrentBlockdump = wxGetCwd();
|
||||||
|
|
||||||
wxString temp(Path::Combine(g_Conf->CurrentBlockdump, somepick));
|
wxString temp(Path::Combine(EmuConfig.CurrentBlockdump, somepick));
|
||||||
|
|
||||||
#ifdef ENABLE_TIMESTAMPS
|
#ifdef ENABLE_TIMESTAMPS
|
||||||
wxDateTime curtime(wxDateTime::GetTimeNow());
|
wxDateTime curtime(wxDateTime::GetTimeNow());
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "CDVDdiscReader.h"
|
#include "CDVDdiscReader.h"
|
||||||
|
#include "Config.h"
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
|
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
||||||
|
@ -184,9 +183,9 @@ void StopKeepAliveThread()
|
||||||
s32 CALLBACK DISCopen(const char* pTitle)
|
s32 CALLBACK DISCopen(const char* pTitle)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
std::wstring drive = g_Conf->Folders.RunDisc.ToStdWstring();
|
std::wstring drive = EmuConfig.CurrentDiscDrive.ToStdWstring();
|
||||||
#else
|
#else
|
||||||
std::string drive = g_Conf->Folders.RunDisc.ToStdString();
|
std::string drive = EmuConfig.CurrentDiscDrive.ToStdString();
|
||||||
#endif
|
#endif
|
||||||
GetValidDrive(drive);
|
GetValidDrive(drive);
|
||||||
if (drive.empty())
|
if (drive.empty())
|
||||||
|
|
|
@ -17,10 +17,13 @@
|
||||||
|
|
||||||
#include "common/emitter/tools.h"
|
#include "common/emitter/tools.h"
|
||||||
#include "common/General.h"
|
#include "common/General.h"
|
||||||
|
#include "common/Path.h"
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
|
||||||
class IniInterface;
|
class IniInterface;
|
||||||
|
|
||||||
|
enum class CDVD_SourceType : uint8_t;
|
||||||
|
|
||||||
enum GamefixId
|
enum GamefixId
|
||||||
{
|
{
|
||||||
GamefixId_FIRST = 0,
|
GamefixId_FIRST = 0,
|
||||||
|
@ -459,6 +462,43 @@ struct Pcsx2Config
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
struct FolderOptions
|
||||||
|
{
|
||||||
|
wxDirName
|
||||||
|
Settings,
|
||||||
|
Bios,
|
||||||
|
Snapshots,
|
||||||
|
Savestates,
|
||||||
|
MemoryCards,
|
||||||
|
Langs,
|
||||||
|
Logs,
|
||||||
|
Cheats,
|
||||||
|
CheatsWS;
|
||||||
|
|
||||||
|
// FolderOptions is expected to be initialized by the frontend, not
|
||||||
|
// loaded in the base config class.
|
||||||
|
FolderOptions();
|
||||||
|
};
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
struct FilenameOptions
|
||||||
|
{
|
||||||
|
wxFileName Bios;
|
||||||
|
|
||||||
|
void LoadSave(IniInterface& conf);
|
||||||
|
|
||||||
|
bool operator==(const FilenameOptions& right) const
|
||||||
|
{
|
||||||
|
return OpEqu(Bios);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=(const FilenameOptions& right) const
|
||||||
|
{
|
||||||
|
return !this->operator==(right);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
BITFIELD32()
|
BITFIELD32()
|
||||||
bool
|
bool
|
||||||
CdvdVerboseReads :1, // enables cdvd read activity verbosely dumped to the console
|
CdvdVerboseReads :1, // enables cdvd read activity verbosely dumped to the console
|
||||||
|
@ -495,7 +535,17 @@ struct Pcsx2Config
|
||||||
|
|
||||||
TraceLogFilters Trace;
|
TraceLogFilters Trace;
|
||||||
|
|
||||||
wxFileName BiosFilename;
|
FolderOptions Folders;
|
||||||
|
FilenameOptions BaseFilenames;
|
||||||
|
|
||||||
|
// Set at runtime, not loaded from config.
|
||||||
|
CDVD_SourceType CdvdSource;
|
||||||
|
wxString CurrentIso;
|
||||||
|
wxString CurrentDiscDrive;
|
||||||
|
wxString CurrentBlockdump;
|
||||||
|
wxString CurrentELF;
|
||||||
|
wxString CurrentIRX;
|
||||||
|
wxString CurrentGameArgs;
|
||||||
|
|
||||||
Pcsx2Config();
|
Pcsx2Config();
|
||||||
void LoadSave( IniInterface& ini );
|
void LoadSave( IniInterface& ini );
|
||||||
|
@ -505,6 +555,8 @@ struct Pcsx2Config
|
||||||
void Save( const wxString& dstfile );
|
void Save( const wxString& dstfile );
|
||||||
void Save( const wxOutputStream& deststream );
|
void Save( const wxOutputStream& deststream );
|
||||||
|
|
||||||
|
wxString FullpathToBios() const;
|
||||||
|
|
||||||
bool MultitapEnabled( uint port ) const;
|
bool MultitapEnabled( uint port ) const;
|
||||||
|
|
||||||
bool operator ==( const Pcsx2Config& right ) const
|
bool operator ==( const Pcsx2Config& right ) const
|
||||||
|
@ -517,13 +569,17 @@ struct Pcsx2Config
|
||||||
OpEqu( Gamefixes ) &&
|
OpEqu( Gamefixes ) &&
|
||||||
OpEqu( Profiler ) &&
|
OpEqu( Profiler ) &&
|
||||||
OpEqu( Trace ) &&
|
OpEqu( Trace ) &&
|
||||||
OpEqu( BiosFilename );
|
OpEqu( BaseFilenames );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator !=( const Pcsx2Config& right ) const
|
bool operator !=( const Pcsx2Config& right ) const
|
||||||
{
|
{
|
||||||
return !this->operator ==( right );
|
return !this->operator ==( right );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// You shouldn't assign to this class, because it'll mess with the runtime variables (Current...).
|
||||||
|
// But you can still use this to copy config. Only needed until we drop wx.
|
||||||
|
void CopyConfig(const Pcsx2Config& cfg);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Pcsx2Config EmuConfig;
|
extern Pcsx2Config EmuConfig;
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include "DEV9.h"
|
#include "DEV9.h"
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
#include "smap.h"
|
#include "smap.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,7 +203,7 @@ s32 DEV9open(void* pDsp)
|
||||||
|
|
||||||
if (hddPath.is_relative())
|
if (hddPath.is_relative())
|
||||||
{
|
{
|
||||||
ghc::filesystem::path path(GetSettingsFolder().ToString().wx_str());
|
ghc::filesystem::path path(EmuConfig.Folders.Settings.ToString().wx_str());
|
||||||
hddPath = path / hddPath;
|
hddPath = path / hddPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,7 +1092,7 @@ void ApplyConfigIfRunning(ConfigDEV9 oldConfig)
|
||||||
if (hddPath.is_relative())
|
if (hddPath.is_relative())
|
||||||
{
|
{
|
||||||
//GHC uses UTF8 on all platforms
|
//GHC uses UTF8 on all platforms
|
||||||
ghc::filesystem::path path(GetSettingsFolder().ToString().wx_str());
|
ghc::filesystem::path path(EmuConfig.Folders.Settings.ToString().wx_str());
|
||||||
hddPath = path / hddPath;
|
hddPath = path / hddPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
void SaveDnsHosts()
|
void SaveDnsHosts()
|
||||||
{
|
{
|
||||||
std::unique_ptr<wxFileConfig> hini(OpenFileConfig(GetSettingsFolder().Combine(wxString("DEV9Hosts.ini")).GetFullPath()));
|
std::unique_ptr<wxFileConfig> hini(OpenFileConfig(EmuConfig.Folders.Settings.Combine(wxString("DEV9Hosts.ini")).GetFullPath()));
|
||||||
IniSaver ini((wxConfigBase*)hini.get());
|
IniSaver ini((wxConfigBase*)hini.get());
|
||||||
|
|
||||||
for (size_t i = 0; i < config.EthHosts.size(); i++)
|
for (size_t i = 0; i < config.EthHosts.size(); i++)
|
||||||
|
@ -57,7 +57,7 @@ void SaveDnsHosts()
|
||||||
|
|
||||||
void LoadDnsHosts()
|
void LoadDnsHosts()
|
||||||
{
|
{
|
||||||
wxFileName iniPath = GetSettingsFolder().Combine(wxString("DEV9Hosts.ini"));
|
wxFileName iniPath = EmuConfig.Folders.Settings.Combine(wxString("DEV9Hosts.ini"));
|
||||||
config.EthHosts.clear();
|
config.EthHosts.clear();
|
||||||
//If no file exists, create one to provice an example config
|
//If no file exists, create one to provice an example config
|
||||||
if (!iniPath.FileExists())
|
if (!iniPath.FileExists())
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include "DEV9/DEV9.h"
|
#include "DEV9/DEV9.h"
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
#include "DEV9/Config.h"
|
#include "DEV9/Config.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -113,7 +113,7 @@ void SaveConf()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
|
const std::string file(EmuConfig.Folders.Settings.Combine(wxString("DEV9.cfg")).GetFullPath());
|
||||||
|
|
||||||
Console.WriteLn("DEV9: CONF: %s", file.c_str());
|
Console.WriteLn("DEV9: CONF: %s", file.c_str());
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ void SaveConf()
|
||||||
|
|
||||||
void LoadConf()
|
void LoadConf()
|
||||||
{
|
{
|
||||||
const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
|
const std::string file(EmuConfig.Folders.Settings.Combine(wxString("DEV9.cfg")).GetFullPath());
|
||||||
if (-1 == access(file.c_str(), F_OK))
|
if (-1 == access(file.c_str(), F_OK))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "DEV9/pcap_io.h"
|
#include "DEV9/pcap_io.h"
|
||||||
#include "DEV9/net.h"
|
#include "DEV9/net.h"
|
||||||
#include "DEV9/PacketReader/IP/IP_Address.h"
|
#include "DEV9/PacketReader/IP/IP_Address.h"
|
||||||
|
#include "Config.h"
|
||||||
#include "gui/AppCoreThread.h"
|
#include "gui/AppCoreThread.h"
|
||||||
|
|
||||||
#include "DEV9/ATA/HddCreate.h"
|
#include "DEV9/ATA/HddCreate.h"
|
||||||
|
@ -199,11 +200,11 @@ void OnInitDialog()
|
||||||
|
|
||||||
void OnBrowse(GtkButton* button, gpointer usr_data)
|
void OnBrowse(GtkButton* button, gpointer usr_data)
|
||||||
{
|
{
|
||||||
ghc::filesystem::path inis(GetSettingsFolder().ToString().ToStdString());
|
ghc::filesystem::path inis(EmuConfig.Folders.Settings.ToString().ToStdString());
|
||||||
|
|
||||||
static const wxChar* hddFilterType = L"HDD|*.raw;*.RAW";
|
static const wxChar* hddFilterType = L"HDD|*.raw;*.RAW";
|
||||||
|
|
||||||
wxFileDialog ctrl(nullptr, _("HDD Image File"), GetSettingsFolder().ToString(), HDD_DEF,
|
wxFileDialog ctrl(nullptr, _("HDD Image File"), EmuConfig.Folders.Settings.ToString(), HDD_DEF,
|
||||||
(wxString)hddFilterType + L"|" + _("All Files (*.*)") + L"|*.*", wxFD_SAVE);
|
(wxString)hddFilterType + L"|" + _("All Files (*.*)") + L"|*.*", wxFD_SAVE);
|
||||||
|
|
||||||
if (ctrl.ShowModal() != wxID_CANCEL)
|
if (ctrl.ShowModal() != wxID_CANCEL)
|
||||||
|
@ -279,7 +280,7 @@ void OnOk()
|
||||||
|
|
||||||
if (hddPath.is_relative())
|
if (hddPath.is_relative())
|
||||||
{
|
{
|
||||||
ghc::filesystem::path path(GetSettingsFolder().ToString().wx_str());
|
ghc::filesystem::path path(EmuConfig.Folders.Settings.ToString().wx_str());
|
||||||
hddPath = path / hddPath;
|
hddPath = path / hddPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "DEV9/DEV9.h"
|
#include "DEV9/DEV9.h"
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
#include "DEV9/Config.h"
|
#include "DEV9/Config.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#include "ws2tcpip.h"
|
#include "ws2tcpip.h"
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ bool FileExists(std::wstring szPath)
|
||||||
|
|
||||||
void SaveConf()
|
void SaveConf()
|
||||||
{
|
{
|
||||||
const std::wstring file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
|
const std::wstring file(EmuConfig.Folders.Settings.Combine(wxString("DEV9.cfg")).GetFullPath());
|
||||||
DeleteFile(file.c_str());
|
DeleteFile(file.c_str());
|
||||||
|
|
||||||
//Create file with UT16 BOM to allow PrivateProfile to save unicode data
|
//Create file with UT16 BOM to allow PrivateProfile to save unicode data
|
||||||
|
@ -89,7 +89,7 @@ void SaveConf()
|
||||||
|
|
||||||
void LoadConf()
|
void LoadConf()
|
||||||
{
|
{
|
||||||
const std::wstring file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
|
const std::wstring file(EmuConfig.Folders.Settings.Combine(wxString("DEV9.cfg")).GetFullPath());
|
||||||
if (FileExists(file.c_str()) == false)
|
if (FileExists(file.c_str()) == false)
|
||||||
{
|
{
|
||||||
LoadDnsHosts();
|
LoadDnsHosts();
|
||||||
|
|
|
@ -219,7 +219,7 @@ void OnBrowse(HWND hW)
|
||||||
wchar_t wbuff[4096] = {0};
|
wchar_t wbuff[4096] = {0};
|
||||||
memcpy(wbuff, HDD_DEF, sizeof(HDD_DEF));
|
memcpy(wbuff, HDD_DEF, sizeof(HDD_DEF));
|
||||||
|
|
||||||
ghc::filesystem::path inis(GetSettingsFolder().ToString().wx_str());
|
ghc::filesystem::path inis(EmuConfig.Folders.Settings.ToString().wx_str());
|
||||||
wstring w_inis = inis.wstring();
|
wstring w_inis = inis.wstring();
|
||||||
|
|
||||||
OPENFILENAMEW ofn;
|
OPENFILENAMEW ofn;
|
||||||
|
@ -336,7 +336,7 @@ void OnOk(HWND hW)
|
||||||
if (hddPath.is_relative())
|
if (hddPath.is_relative())
|
||||||
{
|
{
|
||||||
//GHC uses UTF8 on all platforms
|
//GHC uses UTF8 on all platforms
|
||||||
ghc::filesystem::path path(GetSettingsFolder().ToUTF8().data());
|
ghc::filesystem::path path(EmuConfig.Folders.Settings.ToUTF8().data());
|
||||||
hddPath = path / hddPath;
|
hddPath = path / hddPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "iR5900.h"
|
#include "iR5900.h"
|
||||||
#include "IPU/IPU.h"
|
#include "IPU/IPU.h"
|
||||||
#include "DebugTools/SymbolMap.h"
|
#include "DebugTools/SymbolMap.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
#include "Utilities/AsciiFile.h"
|
#include "Utilities/AsciiFile.h"
|
||||||
|
|
||||||
using namespace R5900;
|
using namespace R5900;
|
||||||
|
@ -208,8 +208,8 @@ void iDumpBlock(u32 ee_pc, u32 ee_size, uptr x86_pc, u32 x86_size)
|
||||||
|
|
||||||
DbgCon.WriteLn( Color_Gray, "dump block %x:%x (x86:0x%x)", ee_pc, ee_end, x86_pc );
|
DbgCon.WriteLn( Color_Gray, "dump block %x:%x (x86:0x%x)", ee_pc, ee_end, x86_pc );
|
||||||
|
|
||||||
g_Conf->Folders.Logs.Mkdir();
|
EmuConfig.Folders.Logs.Mkdir();
|
||||||
wxString dump_filename = Path::Combine( g_Conf->Folders.Logs, wxsFormat(L"R5900dump_%.8X:%.8X.txt", ee_pc, ee_end) );
|
wxString dump_filename = Path::Combine( EmuConfig.Folders.Logs, wxsFormat(L"R5900dump_%.8X:%.8X.txt", ee_pc, ee_end) );
|
||||||
AsciiFile eff( dump_filename, L"w" );
|
AsciiFile eff( dump_filename, L"w" );
|
||||||
|
|
||||||
// Print register content to detect the memory access type. Warning value are taken
|
// Print register content to detect the memory access type. Warning value are taken
|
||||||
|
@ -272,9 +272,9 @@ void iDumpBlock( int startpc, u8 * ptr )
|
||||||
|
|
||||||
DbgCon.WriteLn( Color_Gray, "dump1 %x:%x, %x", startpc, pc, cpuRegs.cycle );
|
DbgCon.WriteLn( Color_Gray, "dump1 %x:%x, %x", startpc, pc, cpuRegs.cycle );
|
||||||
|
|
||||||
g_Conf->Folders.Logs.Mkdir();
|
EmuConfig.Folders.Logs.Mkdir();
|
||||||
AsciiFile eff(
|
AsciiFile eff(
|
||||||
Path::Combine( g_Conf->Folders.Logs, wxsFormat(L"R5900dump%.8X.txt", startpc) ), L"w"
|
Path::Combine( EmuConfig.Folders.Logs, wxsFormat(L"R5900dump%.8X.txt", startpc) ), L"w"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!symbolMap.GetLabelString(startpc).empty())
|
if (!symbolMap.GetLabelString(startpc).empty())
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "Renderers/OpenGL/GSRendererOGL.h"
|
#include "Renderers/OpenGL/GSRendererOGL.h"
|
||||||
#include "GSLzma.h"
|
#include "GSLzma.h"
|
||||||
|
|
||||||
#include "gui/AppConfig.h" // GetSettingsFolder()
|
#include "Config.h"
|
||||||
#include "common/pxStreams.h"
|
#include "common/pxStreams.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1787,7 +1787,7 @@ void GSApp::SetConfigDir()
|
||||||
// core settings aren't populated yet, thus we do populate it if needed either when
|
// core settings aren't populated yet, thus we do populate it if needed either when
|
||||||
// opening GS settings or init -- govanify
|
// opening GS settings or init -- govanify
|
||||||
wxString iniName(L"GS.ini");
|
wxString iniName(L"GS.ini");
|
||||||
m_ini = GetSettingsFolder().Combine(iniName).GetFullPath();
|
m_ini = EmuConfig.Folders.Settings.Combine(iniName).GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GSApp::GetConfigS(const char* entry)
|
std::string GSApp::GetConfigS(const char* entry)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gui/AppConfig.h"
|
#include "pcsx2/Config.h"
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "Device.h"
|
#include "Device.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
@ -61,7 +61,7 @@ void PADSaveConfig()
|
||||||
FILE* f;
|
FILE* f;
|
||||||
|
|
||||||
wxString iniName(L"PAD.ini");
|
wxString iniName(L"PAD.ini");
|
||||||
const std::string iniFile = std::string(GetSettingsFolder().Combine(iniName).GetFullPath()); // default path, just in case
|
const std::string iniFile = std::string(EmuConfig.Folders.Settings.Combine(iniName).GetFullPath()); // default path, just in case
|
||||||
f = fopen(iniFile.c_str(), "w");
|
f = fopen(iniFile.c_str(), "w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ void PADLoadConfig()
|
||||||
|
|
||||||
|
|
||||||
wxString iniName(L"PAD.ini");
|
wxString iniName(L"PAD.ini");
|
||||||
const std::string iniFile = std::string(GetSettingsFolder().Combine(iniName).GetFullPath()); // default path, just in case
|
const std::string iniFile = std::string(EmuConfig.Folders.Settings.Combine(iniName).GetFullPath()); // default path, just in case
|
||||||
f = fopen(iniFile.c_str(), "r");
|
f = fopen(iniFile.c_str(), "r");
|
||||||
if (f == nullptr)
|
if (f == nullptr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
// Needed to know if raw input is available. It requires XP or higher.
|
// Needed to know if raw input is available. It requires XP or higher.
|
||||||
#include "PADRawInput.h"
|
#include "PADRawInput.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
|
|
||||||
//max len 24 wchar_t
|
//max len 24 wchar_t
|
||||||
const wchar_t* padTypes[] = {
|
const wchar_t* padTypes[] = {
|
||||||
|
@ -337,7 +337,7 @@ void PADsetSettingsDir(const char* dir)
|
||||||
|
|
||||||
//uint targlen = MultiByteToWideChar(CP_ACP, 0, dir, -1, NULL, 0);
|
//uint targlen = MultiByteToWideChar(CP_ACP, 0, dir, -1, NULL, 0);
|
||||||
wxString iniName = "PAD.ini";
|
wxString iniName = "PAD.ini";
|
||||||
MultiByteToWideChar(CP_UTF8, 0, std::string(GetSettingsFolder().Combine(iniName).GetFullPath()).c_str(), -1, iniFileUSB, MAX_PATH * 2);
|
MultiByteToWideChar(CP_UTF8, 0, std::string(EmuConfig.Folders.Settings.Combine(iniName).GetFullPath()).c_str(), -1, iniFileUSB, MAX_PATH * 2);
|
||||||
|
|
||||||
createIniDir = false;
|
createIniDir = false;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "IopCommon.h"
|
#include "IopCommon.h"
|
||||||
#include "Patch.h"
|
#include "Patch.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -247,7 +248,7 @@ int LoadPatchesFromDir(wxString name, const wxDirName& folderName, const wxStrin
|
||||||
wxString filespec = name + L"*.pnach";
|
wxString filespec = name + L"*.pnach";
|
||||||
loaded += _LoadPatchFiles(folderName, filespec, friendlyName, numberFoundPatchFiles);
|
loaded += _LoadPatchFiles(folderName, filespec, friendlyName, numberFoundPatchFiles);
|
||||||
|
|
||||||
if (folderName.ToString().IsSameAs(GetCheatsFolder().ToString()) && numberFoundPatchFiles == 0)
|
if (folderName.ToString().IsSameAs(EmuConfig.Folders.Cheats.ToString()) && numberFoundPatchFiles == 0)
|
||||||
{
|
{
|
||||||
wxString pathName = Path::Combine(folderName, name.MakeUpper() + L".pnach");
|
wxString pathName = Path::Combine(folderName, name.MakeUpper() + L".pnach");
|
||||||
PatchesCon->WriteLn(Color_Gray, L"Not found %s file: %s", WX_STR(friendlyName), WX_STR(pathName));
|
PatchesCon->WriteLn(Color_Gray, L"Not found %s file: %s", WX_STR(friendlyName), WX_STR(pathName));
|
||||||
|
|
|
@ -407,8 +407,30 @@ void Pcsx2Config::DebugOptions::LoadSave( IniInterface& ini )
|
||||||
IniBitfield( MemoryViewBytesPerRow );
|
IniBitfield( MemoryViewBytesPerRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Pcsx2Config::FilenameOptions::LoadSave(IniInterface& ini)
|
||||||
|
{
|
||||||
|
ScopedIniGroup path(ini, L"Filenames");
|
||||||
|
|
||||||
|
static const wxFileName pc(L"Please Configure");
|
||||||
|
|
||||||
|
//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.
|
||||||
|
bool needRelativeName = ini.IsSaving() && IsPortable();
|
||||||
|
|
||||||
|
if (needRelativeName)
|
||||||
|
{
|
||||||
|
wxFileName bios_filename = wxFileName(Bios.GetFullName());
|
||||||
|
ini.Entry(L"BIOS", bios_filename, pc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ini.Entry(L"BIOS", Bios, pc);
|
||||||
|
}
|
||||||
|
|
||||||
|
Pcsx2Config::FolderOptions::FolderOptions()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Pcsx2Config::Pcsx2Config()
|
Pcsx2Config::Pcsx2Config()
|
||||||
{
|
{
|
||||||
|
@ -418,6 +440,8 @@ Pcsx2Config::Pcsx2Config()
|
||||||
McdFolderAutoManage = true;
|
McdFolderAutoManage = true;
|
||||||
EnablePatches = true;
|
EnablePatches = true;
|
||||||
BackupSavestate = true;
|
BackupSavestate = true;
|
||||||
|
|
||||||
|
CdvdSource = CDVD_SourceType::Iso;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pcsx2Config::LoadSave( IniInterface& ini )
|
void Pcsx2Config::LoadSave( IniInterface& ini )
|
||||||
|
@ -455,6 +479,9 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
|
||||||
Debugger .LoadSave( ini );
|
Debugger .LoadSave( ini );
|
||||||
Trace .LoadSave( ini );
|
Trace .LoadSave( ini );
|
||||||
|
|
||||||
|
// For now, this in the derived config for backwards ini compatibility.
|
||||||
|
//BaseFilenames.LoadSave(ini);
|
||||||
|
|
||||||
ini.Flush();
|
ini.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,3 +508,40 @@ void Pcsx2Config::Save( const wxString& dstfile )
|
||||||
IniSaver saver( cfg );
|
IniSaver saver( cfg );
|
||||||
LoadSave( saver );
|
LoadSave( saver );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString Pcsx2Config::FullpathToBios() const
|
||||||
|
{
|
||||||
|
return Path::Combine(Folders.Bios, BaseFilenames.Bios);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Pcsx2Config::CopyConfig(const Pcsx2Config& cfg)
|
||||||
|
{
|
||||||
|
Cpu = cfg.Cpu;
|
||||||
|
GS = cfg.GS;
|
||||||
|
Speedhacks = cfg.Speedhacks;
|
||||||
|
Gamefixes = cfg.Gamefixes;
|
||||||
|
Profiler = cfg.Profiler;
|
||||||
|
Debugger = cfg.Debugger;
|
||||||
|
Trace = cfg.Trace;
|
||||||
|
BaseFilenames = cfg.BaseFilenames;
|
||||||
|
|
||||||
|
CdvdVerboseReads = cfg.CdvdVerboseReads;
|
||||||
|
CdvdDumpBlocks = cfg.CdvdDumpBlocks;
|
||||||
|
CdvdShareWrite = cfg.CdvdShareWrite;
|
||||||
|
EnablePatches = cfg.EnablePatches;
|
||||||
|
EnableCheats = cfg.EnableCheats;
|
||||||
|
EnableIPC = cfg.EnableIPC;
|
||||||
|
EnableWideScreenPatches = cfg.EnableWideScreenPatches;
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
|
EnableRecordingTools = cfg.EnableRecordingTools;
|
||||||
|
#endif
|
||||||
|
UseBOOT2Injection = cfg.UseBOOT2Injection;
|
||||||
|
BackupSavestate = cfg.BackupSavestate;
|
||||||
|
McdEnableEjection = cfg.McdEnableEjection;
|
||||||
|
McdFolderAutoManage = cfg.McdFolderAutoManage;
|
||||||
|
MultitapPort0_Enabled = cfg.MultitapPort0_Enabled;
|
||||||
|
MultitapPort1_Enabled = cfg.MultitapPort1_Enabled;
|
||||||
|
ConsoleToStdio = cfg.ConsoleToStdio;
|
||||||
|
HostFs = cfg.HostFs;
|
||||||
|
FullBootConfig = cfg.FullBootConfig;
|
||||||
|
}
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "IopCommon.h"
|
#include "IopCommon.h"
|
||||||
#include "gui/App.h" // For host irx injection hack
|
#include "Config.h"
|
||||||
|
#include "gui/AppCoreThread.h"
|
||||||
|
|
||||||
#include "R5900OpcodeTables.h"
|
#include "R5900OpcodeTables.h"
|
||||||
#include "DebugTools/Breakpoints.h"
|
#include "DebugTools/Breakpoints.h"
|
||||||
|
@ -223,7 +224,7 @@ static __fi void execI()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Inject IRX hack
|
// Inject IRX hack
|
||||||
if (psxRegs.pc == 0x1630 && g_Conf->CurrentIRX.Length() > 3) {
|
if (psxRegs.pc == 0x1630 && EmuConfig.CurrentIRX.Length() > 3) {
|
||||||
if (iopMemRead32(0x20018) == 0x1F) {
|
if (iopMemRead32(0x20018) == 0x1F) {
|
||||||
// FIXME do I need to increase the module count (0x1F -> 0x20)
|
// FIXME do I need to increase the module count (0x1F -> 0x20)
|
||||||
iopMemWrite32(0x20094, 0xbffc0000);
|
iopMemWrite32(0x20094, 0xbffc0000);
|
||||||
|
|
|
@ -633,9 +633,9 @@ void __fastcall eeloadHook()
|
||||||
// mode). Then EELOAD is called with the argument "rom0:PS2LOGO". At this point, we do not need any additional tricks
|
// mode). Then EELOAD is called with the argument "rom0:PS2LOGO". At this point, we do not need any additional tricks
|
||||||
// because EELOAD is now ready to accept launch arguments. So in full-boot mode, we simply wait for PS2LOGO to be called,
|
// because EELOAD is now ready to accept launch arguments. So in full-boot mode, we simply wait for PS2LOGO to be called,
|
||||||
// then we add the desired launch arguments. PS2LOGO passes those on to the game itself as it calls EELOAD a third time.
|
// then we add the desired launch arguments. PS2LOGO passes those on to the game itself as it calls EELOAD a third time.
|
||||||
if (!g_Conf->CurrentGameArgs.empty() && !strcmp(elfname.c_str(), "rom0:PS2LOGO"))
|
if (!EmuConfig.CurrentGameArgs.empty() && !strcmp(elfname.c_str(), "rom0:PS2LOGO"))
|
||||||
{
|
{
|
||||||
const char *argString = g_Conf->CurrentGameArgs.c_str();
|
const char *argString = EmuConfig.CurrentGameArgs.c_str();
|
||||||
Console.WriteLn("eeloadHook: Supplying launch argument(s) '%s' to module '%s'...", argString, elfname.c_str());
|
Console.WriteLn("eeloadHook: Supplying launch argument(s) '%s' to module '%s'...", argString, elfname.c_str());
|
||||||
|
|
||||||
// Join all arguments by space characters so they can be processed as one string by ParseArgumentString(), then add the
|
// Join all arguments by space characters so they can be processed as one string by ParseArgumentString(), then add the
|
||||||
|
@ -648,7 +648,7 @@ void __fastcall eeloadHook()
|
||||||
arg_len = strlen((char *)PSM(arg_ptr));
|
arg_len = strlen((char *)PSM(arg_ptr));
|
||||||
memset(PSM(arg_ptr + arg_len), 0x20, 1);
|
memset(PSM(arg_ptr + arg_len), 0x20, 1);
|
||||||
}
|
}
|
||||||
strcpy((char *)PSM(arg_ptr + arg_len + 1), g_Conf->CurrentGameArgs.c_str());
|
strcpy((char *)PSM(arg_ptr + arg_len + 1), EmuConfig.CurrentGameArgs.c_str());
|
||||||
u32 first_arg_ptr = memRead32(cpuRegs.GPR.n.a1.UD[0]);
|
u32 first_arg_ptr = memRead32(cpuRegs.GPR.n.a1.UD[0]);
|
||||||
#if DEBUG_LAUNCHARG
|
#if DEBUG_LAUNCHARG
|
||||||
Console.WriteLn("eeloadHook: arg block is '%s'.", (char *)PSM(first_arg_ptr));
|
Console.WriteLn("eeloadHook: arg block is '%s'.", (char *)PSM(first_arg_ptr));
|
||||||
|
@ -720,7 +720,7 @@ void __fastcall eeloadHook()
|
||||||
// Only called if g_SkipBiosHack is true
|
// Only called if g_SkipBiosHack is true
|
||||||
void __fastcall eeloadHook2()
|
void __fastcall eeloadHook2()
|
||||||
{
|
{
|
||||||
if (g_Conf->CurrentGameArgs.empty())
|
if (EmuConfig.CurrentGameArgs.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!g_osdsys_str)
|
if (!g_osdsys_str)
|
||||||
|
@ -729,14 +729,14 @@ void __fastcall eeloadHook2()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *argString = g_Conf->CurrentGameArgs.c_str();
|
const char *argString = EmuConfig.CurrentGameArgs.c_str();
|
||||||
Console.WriteLn("eeloadHook2: Supplying launch argument(s) '%s' to ELF '%s'.", argString, (char *)PSM(g_osdsys_str));
|
Console.WriteLn("eeloadHook2: Supplying launch argument(s) '%s' to ELF '%s'.", argString, (char *)PSM(g_osdsys_str));
|
||||||
|
|
||||||
// Add args string after game's ELF name that was written over "rom0:OSDSYS" by eeloadHook(). In between the ELF name and args
|
// Add args string after game's ELF name that was written over "rom0:OSDSYS" by eeloadHook(). In between the ELF name and args
|
||||||
// string we insert a space character so that ParseArgumentString() has one continuous string to process.
|
// string we insert a space character so that ParseArgumentString() has one continuous string to process.
|
||||||
int game_len = strlen((char *)PSM(g_osdsys_str));
|
int game_len = strlen((char *)PSM(g_osdsys_str));
|
||||||
memset(PSM(g_osdsys_str + game_len), 0x20, 1);
|
memset(PSM(g_osdsys_str + game_len), 0x20, 1);
|
||||||
strcpy((char *)PSM(g_osdsys_str + game_len + 1), g_Conf->CurrentGameArgs.c_str());
|
strcpy((char *)PSM(g_osdsys_str + game_len + 1), EmuConfig.CurrentGameArgs.c_str());
|
||||||
#if DEBUG_LAUNCHARG
|
#if DEBUG_LAUNCHARG
|
||||||
Console.WriteLn("eeloadHook2: arg block is '%s'.", (char *)PSM(g_osdsys_str));
|
Console.WriteLn("eeloadHook2: arg block is '%s'.", (char *)PSM(g_osdsys_str));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -292,7 +292,7 @@ void InputRecording::SetupInitialState(u32 newStartingFrame)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Check if the current game matches with the one used to make the original recording
|
// Check if the current game matches with the one used to make the original recording
|
||||||
if (!g_Conf->CurrentIso.IsEmpty())
|
if (!EmuConfig.CurrentIso.IsEmpty())
|
||||||
if (resolveGameName() != inputRecordingData.GetHeader().gameName)
|
if (resolveGameName() != inputRecordingData.GetHeader().gameName)
|
||||||
inputRec::consoleLog("Input recording was possibly constructed for a different game.");
|
inputRec::consoleLog("Input recording was possibly constructed for a different game.");
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ bool InputRecording::Create(wxString fileName, const bool fromSaveState, wxStrin
|
||||||
StateCopy_SaveToFile(savestate);
|
StateCopy_SaveToFile(savestate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sApp.SysExecute(g_Conf->CdvdSource);
|
sApp.SysExecute(EmuConfig.CdvdSource);
|
||||||
|
|
||||||
// Set emulator version
|
// Set emulator version
|
||||||
inputRecordingData.GetHeader().SetEmulatorVersion();
|
inputRecordingData.GetHeader().SetEmulatorVersion();
|
||||||
|
@ -405,7 +405,7 @@ bool InputRecording::Play(wxWindow* parent, wxString filename)
|
||||||
{
|
{
|
||||||
state = InputRecordingMode::Replaying;
|
state = InputRecordingMode::Replaying;
|
||||||
initialLoad = true;
|
initialLoad = true;
|
||||||
sApp.SysExecute(g_Conf->CdvdSource);
|
sApp.SysExecute(EmuConfig.CdvdSource);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ void InputRecording::GoToFirstFrame(wxWindow* parent)
|
||||||
StateCopy_LoadFromFile(savestate);
|
StateCopy_LoadFromFile(savestate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sApp.SysExecute(g_Conf->CdvdSource);
|
sApp.SysExecute(EmuConfig.CdvdSource);
|
||||||
|
|
||||||
if (IsRecording())
|
if (IsRecording())
|
||||||
SetToReplayMode();
|
SetToReplayMode();
|
||||||
|
@ -462,7 +462,7 @@ wxString InputRecording::resolveGameName()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return !gameName.IsEmpty() ? gameName : (wxString)Path::GetFilename(g_Conf->CurrentIso);
|
return !gameName.IsEmpty() ? gameName : (wxString)Path::GetFilename(EmuConfig.CurrentIso);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include <wx/fileconf.h>
|
#include <wx/fileconf.h>
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ void initIni()
|
||||||
{
|
{
|
||||||
if (!pathSet)
|
if (!pathSet)
|
||||||
{
|
{
|
||||||
path = GetSettingsFolder().Combine(path).GetFullPath();
|
path = EmuConfig.Folders.Settings.Combine(path).GetFullPath();
|
||||||
pathSet = true;
|
pathSet = true;
|
||||||
}
|
}
|
||||||
if (spuConfig == nullptr)
|
if (spuConfig == nullptr)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
#include "SPU2/Global.h"
|
#include "SPU2/Global.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void initIni()
|
||||||
{
|
{
|
||||||
if (!pathSet)
|
if (!pathSet)
|
||||||
{
|
{
|
||||||
CfgFile = GetSettingsFolder().Combine(CfgFile).GetFullPath();
|
CfgFile = EmuConfig.Folders.Settings.Combine(CfgFile).GetFullPath();
|
||||||
pathSet = true;
|
pathSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "VUmicro.h"
|
#include "VUmicro.h"
|
||||||
#include "MTVU.h"
|
#include "MTVU.h"
|
||||||
#include "Cache.h"
|
#include "Cache.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#include "Elfheader.h"
|
#include "Elfheader.h"
|
||||||
#include "Counters.h"
|
#include "Counters.h"
|
||||||
|
@ -58,7 +58,7 @@ wxString SaveStateBase::GetFilename( int slot )
|
||||||
wxString serialName( DiscSerial );
|
wxString serialName( DiscSerial );
|
||||||
if (serialName.IsEmpty()) serialName = L"BIOS";
|
if (serialName.IsEmpty()) serialName = L"BIOS";
|
||||||
|
|
||||||
return (g_Conf->Folders.Savestates +
|
return (EmuConfig.Folders.Savestates +
|
||||||
pxsFmt( L"%s (%08X).%02d.p2s", WX_STR(serialName), ElfCRC, slot )).GetFullPath();
|
pxsFmt( L"%s (%08X).%02d.p2s", WX_STR(serialName), ElfCRC, slot )).GetFullPath();
|
||||||
|
|
||||||
//return (g_Conf->Folders.Savestates +
|
//return (g_Conf->Folders.Savestates +
|
||||||
|
|
|
@ -182,7 +182,7 @@ void SysCoreThread::ApplySettings(const Pcsx2Config& src)
|
||||||
m_resetProfilers = (src.Profiler != EmuConfig.Profiler);
|
m_resetProfilers = (src.Profiler != EmuConfig.Profiler);
|
||||||
m_resetVsyncTimers = (src.GS != EmuConfig.GS);
|
m_resetVsyncTimers = (src.GS != EmuConfig.GS);
|
||||||
|
|
||||||
const_cast<Pcsx2Config&>(EmuConfig) = src;
|
EmuConfig.CopyConfig(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "shared/inifile_usb.h"
|
#include "shared/inifile_usb.h"
|
||||||
#include "platcompat.h"
|
#include "platcompat.h"
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ void USBsetSettingsDir()
|
||||||
if(!USBpathSet)
|
if(!USBpathSet)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
IniPath = GetSettingsFolder().Combine( iniFileUSB ).GetFullPath(); // default path, just in case
|
IniPath = EmuConfig.Folders.Settings.Combine( iniFileUSB ).GetFullPath(); // default path, just in case
|
||||||
#else
|
#else
|
||||||
IniPath = std::string(GetSettingsFolder().Combine( iniFileUSB ).GetFullPath()); // default path, just in case
|
IniPath = std::string(EmuConfig.Folders.Settings.Combine( iniFileUSB ).GetFullPath()); // default path, just in case
|
||||||
#endif
|
#endif
|
||||||
USBpathSet = true;
|
USBpathSet = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,6 @@ enum GsWindowMode_t
|
||||||
class CommandlineOverrides
|
class CommandlineOverrides
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AppConfig::FilenameOptions Filenames;
|
|
||||||
wxDirName SettingsFolder;
|
wxDirName SettingsFolder;
|
||||||
wxFileName VmSettingsFile;
|
wxFileName VmSettingsFile;
|
||||||
|
|
||||||
|
|
|
@ -410,29 +410,9 @@ namespace FilenameDefs
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static wxDirName GetResolvedFolder(FoldersEnum_t id)
|
static wxDirName GetSettingsFolder()
|
||||||
{
|
{
|
||||||
return g_Conf->Folders.IsDefault(id) ? PathDefs::Get(id) : g_Conf->Folders[id];
|
if (wxGetApp().Overrides.SettingsFolder.IsOk())
|
||||||
}
|
|
||||||
|
|
||||||
wxDirName GetLogFolder()
|
|
||||||
{
|
|
||||||
return GetResolvedFolder(FolderId_Logs);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDirName GetCheatsFolder()
|
|
||||||
{
|
|
||||||
return GetResolvedFolder(FolderId_Cheats);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDirName GetCheatsWsFolder()
|
|
||||||
{
|
|
||||||
return GetResolvedFolder(FolderId_CheatsWS);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDirName GetSettingsFolder()
|
|
||||||
{
|
|
||||||
if( wxGetApp().Overrides.SettingsFolder.IsOk() )
|
|
||||||
return wxGetApp().Overrides.SettingsFolder;
|
return wxGetApp().Overrides.SettingsFolder;
|
||||||
|
|
||||||
return UseDefaultSettingsFolder ? PathDefs::GetSettings() : SettingsFolder;
|
return UseDefaultSettingsFolder ? PathDefs::GetSettings() : SettingsFolder;
|
||||||
|
@ -456,8 +436,6 @@ wxString GetUiKeysFilename()
|
||||||
return GetSettingsFolder().Combine( fname ).GetFullPath();
|
return GetSettingsFolder().Combine( fname ).GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString AppConfig::FullpathToBios() const { return Path::Combine( Folders.Bios, BaseFilenames.Bios ); }
|
|
||||||
wxString AppConfig::FullpathToMcd( uint slot ) const
|
wxString AppConfig::FullpathToMcd( uint slot ) const
|
||||||
{
|
{
|
||||||
return Path::Combine( Folders.MemoryCards, Mcd[slot].Filename );
|
return Path::Combine( Folders.MemoryCards, Mcd[slot].Filename );
|
||||||
|
@ -492,8 +470,6 @@ AppConfig::AppConfig()
|
||||||
EnablePresets = true;
|
EnablePresets = true;
|
||||||
PresetIndex = 1;
|
PresetIndex = 1;
|
||||||
|
|
||||||
CdvdSource = CDVD_SourceType::Iso;
|
|
||||||
|
|
||||||
// To be moved to FileMemoryCard pluign (someday)
|
// To be moved to FileMemoryCard pluign (someday)
|
||||||
for( uint slot=0; slot<8; ++slot )
|
for( uint slot=0; slot<8; ++slot )
|
||||||
{
|
{
|
||||||
|
@ -595,13 +571,15 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
|
||||||
IniEntry( Toolbar_ImageSize );
|
IniEntry( Toolbar_ImageSize );
|
||||||
IniEntry( Toolbar_ShowLabels );
|
IniEntry( Toolbar_ShowLabels );
|
||||||
|
|
||||||
wxFileName res(CurrentIso);
|
ini.EnumEntry(L"CdvdSource", EmuConfig.CdvdSource, CDVD_SourceLabels, EmuConfig.CdvdSource);
|
||||||
ini.Entry( L"CurrentIso", res, res, ini.IsLoading() || IsPortable() );
|
|
||||||
CurrentIso = res.GetFullPath();
|
|
||||||
|
|
||||||
IniEntry( CurrentBlockdump );
|
wxFileName res(EmuConfig.CurrentIso);
|
||||||
IniEntry( CurrentELF );
|
ini.Entry(L"CurrentIso", res, res, ini.IsLoading() || IsPortable());
|
||||||
IniEntry( CurrentIRX );
|
EmuConfig.CurrentIso = res.GetFullPath();
|
||||||
|
|
||||||
|
ini.Entry(wxT("CurrentBlockdump"), EmuConfig.CurrentBlockdump, EmuConfig.CurrentBlockdump);
|
||||||
|
ini.Entry(wxT("CurrentELF"), EmuConfig.CurrentELF, EmuConfig.CurrentELF);
|
||||||
|
ini.Entry(wxT("CurrentIRX"), EmuConfig.CurrentIRX, EmuConfig.CurrentIRX);
|
||||||
|
|
||||||
IniEntry( EnableSpeedHacks );
|
IniEntry( EnableSpeedHacks );
|
||||||
IniEntry( EnableGameFixes );
|
IniEntry( EnableGameFixes );
|
||||||
|
@ -614,8 +592,6 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
IniEntry( McdCompressNTFS );
|
IniEntry( McdCompressNTFS );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ini.EnumEntry( L"CdvdSource", CdvdSource, CDVD_SourceLabels, CdvdSource );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
@ -628,7 +604,12 @@ void AppConfig::LoadSave( IniInterface& ini )
|
||||||
ProgLogBox .LoadSave( ini, L"ProgramLog" );
|
ProgLogBox .LoadSave( ini, L"ProgramLog" );
|
||||||
|
|
||||||
Folders .LoadSave( ini );
|
Folders .LoadSave( ini );
|
||||||
BaseFilenames .LoadSave( ini );
|
|
||||||
|
// sync the EmuOptions folders with what we loaded. what a mess this is....
|
||||||
|
if (ini.IsLoading())
|
||||||
|
EmuOptions.Folders = EmuConfig.Folders;
|
||||||
|
|
||||||
|
EmuOptions.BaseFilenames.LoadSave( ini );
|
||||||
GSWindow .LoadSave( ini );
|
GSWindow .LoadSave( ini );
|
||||||
Framerate .LoadSave( ini );
|
Framerate .LoadSave( ini );
|
||||||
#ifndef DISABLE_RECORDING
|
#ifndef DISABLE_RECORDING
|
||||||
|
@ -734,28 +715,20 @@ void AppConfig::FolderOptions::LoadSave( IniInterface& ini )
|
||||||
|
|
||||||
for( int i=0; i<FolderId_COUNT; ++i )
|
for( int i=0; i<FolderId_COUNT; ++i )
|
||||||
operator[]( (FoldersEnum_t)i ).Normalize();
|
operator[]( (FoldersEnum_t)i ).Normalize();
|
||||||
|
|
||||||
|
EmuConfig.Folders.Settings = GetSettingsFolder();
|
||||||
|
EmuConfig.CurrentDiscDrive = RunDisc;
|
||||||
|
EmuConfig.Folders.Bios = Bios;
|
||||||
|
EmuConfig.Folders.Snapshots = Snapshots;
|
||||||
|
EmuConfig.Folders.Savestates = Savestates;
|
||||||
|
EmuConfig.Folders.MemoryCards = MemoryCards;
|
||||||
|
EmuConfig.Folders.Logs = Logs;
|
||||||
|
EmuConfig.Folders.Langs = Langs;
|
||||||
|
EmuConfig.Folders.Cheats = Cheats;
|
||||||
|
EmuConfig.Folders.CheatsWS = CheatsWS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
void AppConfig::FilenameOptions::LoadSave( IniInterface& ini )
|
|
||||||
{
|
|
||||||
ScopedIniGroup path( ini, L"Filenames" );
|
|
||||||
|
|
||||||
static const wxFileName pc( L"Please Configure" );
|
|
||||||
|
|
||||||
//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.
|
|
||||||
bool needRelativeName = ini.IsSaving() && IsPortable();
|
|
||||||
|
|
||||||
if( needRelativeName ) {
|
|
||||||
wxFileName bios_filename = wxFileName( Bios.GetFullName() );
|
|
||||||
ini.Entry( L"BIOS", bios_filename, pc );
|
|
||||||
} else
|
|
||||||
ini.Entry( L"BIOS", Bios, pc );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
AppConfig::GSWindowOptions::GSWindowOptions()
|
AppConfig::GSWindowOptions::GSWindowOptions()
|
||||||
{
|
{
|
||||||
|
@ -1221,9 +1194,9 @@ static void LoadUiSettings()
|
||||||
g_Conf = std::make_unique<AppConfig>();
|
g_Conf = std::make_unique<AppConfig>();
|
||||||
g_Conf->LoadSave( loader );
|
g_Conf->LoadSave( loader );
|
||||||
|
|
||||||
if( !wxFile::Exists( g_Conf->CurrentIso ) )
|
if( !wxFile::Exists( EmuConfig.CurrentIso ) )
|
||||||
{
|
{
|
||||||
g_Conf->CurrentIso.clear();
|
EmuConfig.CurrentIso.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
sApp.DispatchUiSettingsEvent( loader );
|
sApp.DispatchUiSettingsEvent( loader );
|
||||||
|
@ -1256,12 +1229,12 @@ void AppLoadSettings()
|
||||||
|
|
||||||
static void SaveUiSettings()
|
static void SaveUiSettings()
|
||||||
{
|
{
|
||||||
if( !wxFile::Exists( g_Conf->CurrentIso ) )
|
if( !wxFile::Exists(EmuConfig.CurrentIso ) )
|
||||||
{
|
{
|
||||||
g_Conf->CurrentIso.clear();
|
EmuConfig.CurrentIso.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
sApp.GetRecentIsoManager().Add( g_Conf->CurrentIso );
|
sApp.GetRecentIsoManager().Add( EmuConfig.CurrentIso );
|
||||||
|
|
||||||
AppIniSaver saver;
|
AppIniSaver saver;
|
||||||
g_Conf->LoadSave( saver );
|
g_Conf->LoadSave( saver );
|
||||||
|
|
|
@ -63,15 +63,10 @@ extern wxDirName SettingsFolder; // dictates where the settings folder comes
|
||||||
|
|
||||||
extern wxDirName InstallFolder;
|
extern wxDirName InstallFolder;
|
||||||
|
|
||||||
extern wxDirName GetSettingsFolder();
|
|
||||||
extern wxString GetVmSettingsFilename();
|
extern wxString GetVmSettingsFilename();
|
||||||
extern wxString GetUiSettingsFilename();
|
extern wxString GetUiSettingsFilename();
|
||||||
extern wxString GetUiKeysFilename();
|
extern wxString GetUiKeysFilename();
|
||||||
|
|
||||||
extern wxDirName GetLogFolder();
|
|
||||||
extern wxDirName GetCheatsFolder();
|
|
||||||
extern wxDirName GetCheatsWsFolder();
|
|
||||||
|
|
||||||
enum InstallationModeType
|
enum InstallationModeType
|
||||||
{
|
{
|
||||||
// Use the user defined folder selections. These can be anywhere on a user's hard drive,
|
// Use the user defined folder selections. These can be anywhere on a user's hard drive,
|
||||||
|
@ -143,9 +138,9 @@ public:
|
||||||
Cheats,
|
Cheats,
|
||||||
CheatsWS;
|
CheatsWS;
|
||||||
|
|
||||||
wxDirName RunIso; // last used location for Iso loading.
|
wxDirName RunIso; // last used location for Iso loading.
|
||||||
wxDirName RunELF; // last used location for ELF loading.
|
wxDirName RunELF; // last used location for ELF loading.
|
||||||
wxString RunDisc; // last used location for Disc loading.
|
wxString RunDisc; // last used location for Disc loading.
|
||||||
|
|
||||||
FolderOptions();
|
FolderOptions();
|
||||||
void LoadSave( IniInterface& conf );
|
void LoadSave( IniInterface& conf );
|
||||||
|
@ -158,14 +153,6 @@ public:
|
||||||
bool IsDefault( FoldersEnum_t folderidx ) const;
|
bool IsDefault( FoldersEnum_t folderidx ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
struct FilenameOptions
|
|
||||||
{
|
|
||||||
wxFileName Bios;
|
|
||||||
|
|
||||||
void LoadSave( IniInterface& conf );
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// Options struct for each memory card.
|
// Options struct for each memory card.
|
||||||
//
|
//
|
||||||
|
@ -317,13 +304,6 @@ public:
|
||||||
|
|
||||||
bool AskOnBoot;
|
bool AskOnBoot;
|
||||||
|
|
||||||
wxString CurrentIso;
|
|
||||||
wxString CurrentBlockdump;
|
|
||||||
wxString CurrentELF;
|
|
||||||
wxString CurrentIRX;
|
|
||||||
CDVD_SourceType CdvdSource;
|
|
||||||
wxString CurrentGameArgs;
|
|
||||||
|
|
||||||
// Memorycard options - first 2 are default slots, last 6 are multitap 1 and 2
|
// Memorycard options - first 2 are default slots, last 6 are multitap 1 and 2
|
||||||
// slots (3 each)
|
// slots (3 each)
|
||||||
McdOptions Mcd[8];
|
McdOptions Mcd[8];
|
||||||
|
@ -331,7 +311,6 @@ public:
|
||||||
|
|
||||||
ConsoleLogOptions ProgLogBox;
|
ConsoleLogOptions ProgLogBox;
|
||||||
FolderOptions Folders;
|
FolderOptions Folders;
|
||||||
FilenameOptions BaseFilenames;
|
|
||||||
GSWindowOptions GSWindow;
|
GSWindowOptions GSWindow;
|
||||||
FramerateOptions Framerate;
|
FramerateOptions Framerate;
|
||||||
#ifndef DISABLE_RECORDING
|
#ifndef DISABLE_RECORDING
|
||||||
|
@ -349,7 +328,6 @@ public:
|
||||||
public:
|
public:
|
||||||
AppConfig();
|
AppConfig();
|
||||||
|
|
||||||
wxString FullpathToBios() const;
|
|
||||||
wxString FullpathToMcd( uint slot ) const;
|
wxString FullpathToMcd( uint slot ) const;
|
||||||
|
|
||||||
void LoadSave( IniInterface& ini );
|
void LoadSave( IniInterface& ini );
|
||||||
|
|
|
@ -196,7 +196,7 @@ void AppCoreThread::ChangeCdvdSource()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CDVD_SourceType cdvdsrc(g_Conf->CdvdSource);
|
CDVD_SourceType cdvdsrc(EmuConfig.CdvdSource);
|
||||||
if (cdvdsrc == CDVDsys_GetSourceType())
|
if (cdvdsrc == CDVDsys_GetSourceType())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -215,13 +215,13 @@ void Pcsx2App::SysApplySettings()
|
||||||
return;
|
return;
|
||||||
CoreThread.ApplySettings(g_Conf->EmuOptions);
|
CoreThread.ApplySettings(g_Conf->EmuOptions);
|
||||||
|
|
||||||
CDVD_SourceType cdvdsrc(g_Conf->CdvdSource);
|
CDVD_SourceType cdvdsrc(EmuConfig.CdvdSource);
|
||||||
if (cdvdsrc != CDVDsys_GetSourceType() || (cdvdsrc == CDVD_SourceType::Iso && (CDVDsys_GetFile(cdvdsrc) != g_Conf->CurrentIso)))
|
if (cdvdsrc != CDVDsys_GetSourceType() || (cdvdsrc == CDVD_SourceType::Iso && (CDVDsys_GetFile(cdvdsrc) != EmuConfig.CurrentIso)))
|
||||||
{
|
{
|
||||||
CoreThread.ResetCdvd();
|
CoreThread.ResetCdvd();
|
||||||
}
|
}
|
||||||
|
|
||||||
CDVDsys_SetFile(CDVD_SourceType::Iso, g_Conf->CurrentIso);
|
CDVDsys_SetFile(CDVD_SourceType::Iso, EmuConfig.CurrentIso);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppCoreThread::OnResumeReady()
|
void AppCoreThread::OnResumeReady()
|
||||||
|
@ -392,7 +392,7 @@ static void _ApplySettings(const Pcsx2Config& src, Pcsx2Config& fixup)
|
||||||
// Note: It's important that we apply the commandline overrides *before* database fixes.
|
// Note: It's important that we apply the commandline overrides *before* database fixes.
|
||||||
// The database takes precedence (if enabled).
|
// The database takes precedence (if enabled).
|
||||||
|
|
||||||
fixup = src;
|
fixup.CopyConfig(src);
|
||||||
|
|
||||||
const CommandlineOverrides& overrides(wxGetApp().Overrides);
|
const CommandlineOverrides& overrides(wxGetApp().Overrides);
|
||||||
if (overrides.DisableSpeedhacks || !g_Conf->EnableSpeedHacks)
|
if (overrides.DisableSpeedhacks || !g_Conf->EnableSpeedHacks)
|
||||||
|
@ -491,12 +491,12 @@ static void _ApplySettings(const Pcsx2Config& src, Pcsx2Config& fixup)
|
||||||
|
|
||||||
// regular cheat patches
|
// regular cheat patches
|
||||||
if (fixup.EnableCheats)
|
if (fixup.EnableCheats)
|
||||||
gameCheats.Printf(L" [%d Cheats]", LoadPatchesFromDir(GameInfo::gameCRC, GetCheatsFolder(), L"Cheats"));
|
gameCheats.Printf(L" [%d Cheats]", LoadPatchesFromDir(GameInfo::gameCRC, EmuConfig.Folders.Cheats, L"Cheats"));
|
||||||
|
|
||||||
// wide screen patches
|
// wide screen patches
|
||||||
if (fixup.EnableWideScreenPatches)
|
if (fixup.EnableWideScreenPatches)
|
||||||
{
|
{
|
||||||
if (int numberLoadedWideScreenPatches = LoadPatchesFromDir(GameInfo::gameCRC, GetCheatsWsFolder(), L"Widescreen hacks"))
|
if (int numberLoadedWideScreenPatches = LoadPatchesFromDir(GameInfo::gameCRC, EmuConfig.Folders.CheatsWS, L"Widescreen hacks"))
|
||||||
{
|
{
|
||||||
gameWsHacks.Printf(L" [%d widescreen hacks]", numberLoadedWideScreenPatches);
|
gameWsHacks.Printf(L" [%d widescreen hacks]", numberLoadedWideScreenPatches);
|
||||||
Console.WriteLn(Color_Gray, "Found widescreen patches in the cheats_ws folder --> skipping cheats_ws.zip");
|
Console.WriteLn(Color_Gray, "Found widescreen patches in the cheats_ws folder --> skipping cheats_ws.zip");
|
||||||
|
@ -590,7 +590,7 @@ void AppCoreThread::OnResumeInThread(SystemsMask systemsToReinstate)
|
||||||
{
|
{
|
||||||
if (m_resetCdvd)
|
if (m_resetCdvd)
|
||||||
{
|
{
|
||||||
CDVDsys_ChangeSource(g_Conf->CdvdSource);
|
CDVDsys_ChangeSource(EmuConfig.CdvdSource);
|
||||||
cdvdCtrlTrayOpen();
|
cdvdCtrlTrayOpen();
|
||||||
DoCDVDopen();
|
DoCDVDopen();
|
||||||
m_resetCdvd = false;
|
m_resetCdvd = false;
|
||||||
|
|
|
@ -458,16 +458,16 @@ bool Pcsx2App::OnInit()
|
||||||
(new GameDatabaseLoaderThread())->Start();
|
(new GameDatabaseLoaderThread())->Start();
|
||||||
|
|
||||||
// By default no IRX injection
|
// By default no IRX injection
|
||||||
g_Conf->CurrentIRX = "";
|
EmuConfig.CurrentIRX = "";
|
||||||
|
|
||||||
if (Startup.SysAutoRun)
|
if (Startup.SysAutoRun)
|
||||||
{
|
{
|
||||||
g_Conf->EmuOptions.UseBOOT2Injection = !Startup.NoFastBoot;
|
g_Conf->EmuOptions.UseBOOT2Injection = !Startup.NoFastBoot;
|
||||||
g_Conf->CdvdSource = Startup.CdvdSource;
|
EmuConfig.CdvdSource = Startup.CdvdSource;
|
||||||
if (Startup.CdvdSource == CDVD_SourceType::Iso)
|
if (Startup.CdvdSource == CDVD_SourceType::Iso)
|
||||||
SysUpdateIsoSrcFile(Startup.IsoFile);
|
SysUpdateIsoSrcFile(Startup.IsoFile);
|
||||||
sApp.SysExecute(Startup.CdvdSource);
|
sApp.SysExecute(Startup.CdvdSource);
|
||||||
g_Conf->CurrentGameArgs = Startup.GameLaunchArgs;
|
EmuConfig.CurrentGameArgs = Startup.GameLaunchArgs;
|
||||||
}
|
}
|
||||||
else if (Startup.SysAutoRunElf)
|
else if (Startup.SysAutoRunElf)
|
||||||
{
|
{
|
||||||
|
@ -495,7 +495,7 @@ bool Pcsx2App::OnInit()
|
||||||
{
|
{
|
||||||
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
||||||
|
|
||||||
g_Conf->CurrentIRX = Startup.ElfFile;
|
EmuConfig.CurrentIRX = Startup.ElfFile;
|
||||||
|
|
||||||
// FIXME: ElfFile is an irx it will crash
|
// FIXME: ElfFile is an irx it will crash
|
||||||
sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile);
|
sApp.SysExecute(Startup.CdvdSource, Startup.ElfFile);
|
||||||
|
|
|
@ -722,8 +722,6 @@ void AppApplySettings( const AppConfig* oldconf )
|
||||||
g_Conf->Folders.Cheats.Mkdir();
|
g_Conf->Folders.Cheats.Mkdir();
|
||||||
g_Conf->Folders.CheatsWS.Mkdir();
|
g_Conf->Folders.CheatsWS.Mkdir();
|
||||||
|
|
||||||
g_Conf->EmuOptions.BiosFilename = g_Conf->FullpathToBios();
|
|
||||||
|
|
||||||
RelocateLogfile();
|
RelocateLogfile();
|
||||||
|
|
||||||
if( (oldconf == NULL) || (oldconf->LanguageCode.CmpNoCase(g_Conf->LanguageCode)) )
|
if( (oldconf == NULL) || (oldconf->LanguageCode.CmpNoCase(g_Conf->LanguageCode)) )
|
||||||
|
@ -1004,7 +1002,7 @@ protected:
|
||||||
// This function below gets called again from AppCoreThread.cpp and will pass the current ISO regardless if we
|
// This function below gets called again from AppCoreThread.cpp and will pass the current ISO regardless if we
|
||||||
// are starting an ELF. In terms of symbol loading this doesn't matter because AppCoreThread.cpp doesn't clear the symbol map
|
// are starting an ELF. In terms of symbol loading this doesn't matter because AppCoreThread.cpp doesn't clear the symbol map
|
||||||
// and we _only_ read symbols if the map is empty
|
// and we _only_ read symbols if the map is empty
|
||||||
CDVDsys_SetFile(CDVD_SourceType::Iso, m_UseELFOverride ? m_elf_override : g_Conf->CurrentIso );
|
CDVDsys_SetFile(CDVD_SourceType::Iso, m_UseELFOverride ? m_elf_override : EmuConfig.CurrentIso );
|
||||||
if( m_UseCDVDsrc )
|
if( m_UseCDVDsrc )
|
||||||
CDVDsys_ChangeSource( m_cdvdsrc_type );
|
CDVDsys_ChangeSource( m_cdvdsrc_type );
|
||||||
else if( CDVD == NULL )
|
else if( CDVD == NULL )
|
||||||
|
@ -1060,7 +1058,7 @@ void SysStatus( const wxString& text )
|
||||||
// Applies a new active iso source file
|
// Applies a new active iso source file
|
||||||
void SysUpdateIsoSrcFile( const wxString& newIsoFile )
|
void SysUpdateIsoSrcFile( const wxString& newIsoFile )
|
||||||
{
|
{
|
||||||
g_Conf->CurrentIso = newIsoFile;
|
EmuConfig.CurrentIso = newIsoFile;
|
||||||
sMainFrame.UpdateStatusBar();
|
sMainFrame.UpdateStatusBar();
|
||||||
sMainFrame.UpdateCdvdSrcSelection();
|
sMainFrame.UpdateCdvdSrcSelection();
|
||||||
}
|
}
|
||||||
|
@ -1068,6 +1066,7 @@ void SysUpdateIsoSrcFile( const wxString& newIsoFile )
|
||||||
void SysUpdateDiscSrcDrive( const wxString& newDiscDrive )
|
void SysUpdateDiscSrcDrive( const wxString& newDiscDrive )
|
||||||
{
|
{
|
||||||
g_Conf->Folders.RunDisc = newDiscDrive;
|
g_Conf->Folders.RunDisc = newDiscDrive;
|
||||||
|
EmuConfig.CurrentDiscDrive = newDiscDrive;
|
||||||
AppSaveSettings();
|
AppSaveSettings();
|
||||||
sMainFrame.UpdateCdvdSrcSelection();
|
sMainFrame.UpdateCdvdSrcSelection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ protected:
|
||||||
|
|
||||||
dialog += dialog.Heading(AddAppName(_("You have dropped the following ELF binary into %s:\n\n")));
|
dialog += dialog.Heading(AddAppName(_("You have dropped the following ELF binary into %s:\n\n")));
|
||||||
dialog += dialog.GetCharHeight();
|
dialog += dialog.GetCharHeight();
|
||||||
dialog += dialog.Text( g_Conf->CurrentELF );
|
dialog += dialog.Text( EmuConfig.CurrentELF );
|
||||||
dialog += dialog.GetCharHeight();
|
dialog += dialog.GetCharHeight();
|
||||||
dialog += dialog.Heading(GetMsg_ConfirmSysReset());
|
dialog += dialog.Heading(GetMsg_ConfirmSysReset());
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ protected:
|
||||||
if( confirmed )
|
if( confirmed )
|
||||||
{
|
{
|
||||||
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
||||||
sApp.SysExecute( g_Conf->CdvdSource, g_Conf->CurrentELF );
|
sApp.SysExecute( EmuConfig.CdvdSource, EmuConfig.CurrentELF );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
stopped_core.AllowResume();
|
stopped_core.AllowResume();
|
||||||
|
@ -175,7 +175,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
||||||
{
|
{
|
||||||
Console.WriteLn( L"(Drag&Drop) Found ELF file type!" );
|
Console.WriteLn( L"(Drag&Drop) Found ELF file type!" );
|
||||||
|
|
||||||
g_Conf->CurrentELF = filenames[0];
|
EmuConfig.CurrentELF = filenames[0];
|
||||||
|
|
||||||
wxGetApp().PostEvent( DroppedElf(m_WindowBound) );
|
wxGetApp().PostEvent( DroppedElf(m_WindowBound) );
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -82,12 +82,12 @@ void MainEmuFrame::UpdateStatusBar()
|
||||||
if (g_Conf->EnableFastBoot)
|
if (g_Conf->EnableFastBoot)
|
||||||
temp += "Fast Boot - ";
|
temp += "Fast Boot - ";
|
||||||
|
|
||||||
if (g_Conf->CdvdSource == CDVD_SourceType::Iso)
|
if (EmuConfig.CdvdSource == CDVD_SourceType::Iso)
|
||||||
temp += "Load: '" + wxFileName(g_Conf->CurrentIso).GetFullName() + "' ";
|
temp += "Load: '" + wxFileName(EmuConfig.CurrentIso).GetFullName() + "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
m_statusbar.SetStatusText(temp, 0);
|
m_statusbar.SetStatusText(temp, 0);
|
||||||
m_statusbar.SetStatusText(CDVD_SourceLabels[enum_cast(g_Conf->CdvdSource)], 1);
|
m_statusbar.SetStatusText(CDVD_SourceLabels[enum_cast(EmuConfig.CdvdSource)], 1);
|
||||||
|
|
||||||
#ifdef __M_X86_64
|
#ifdef __M_X86_64
|
||||||
m_statusbar.SetStatusText("x64", 2);
|
m_statusbar.SetStatusText("x64", 2);
|
||||||
|
@ -100,7 +100,7 @@ void MainEmuFrame::UpdateCdvdSrcSelection()
|
||||||
{
|
{
|
||||||
MenuIdentifiers cdsrc = MenuId_Src_Iso;
|
MenuIdentifiers cdsrc = MenuId_Src_Iso;
|
||||||
|
|
||||||
switch (g_Conf->CdvdSource)
|
switch (EmuConfig.CdvdSource)
|
||||||
{
|
{
|
||||||
case CDVD_SourceType::Iso:
|
case CDVD_SourceType::Iso:
|
||||||
cdsrc = MenuId_Src_Iso;
|
cdsrc = MenuId_Src_Iso;
|
||||||
|
@ -772,7 +772,7 @@ void MainEmuFrame::ApplySuspendStatus()
|
||||||
|
|
||||||
void MainEmuFrame::ApplyCDVDStatus()
|
void MainEmuFrame::ApplyCDVDStatus()
|
||||||
{
|
{
|
||||||
const CDVD_SourceType Source = g_Conf->CdvdSource;
|
const CDVD_SourceType Source = EmuConfig.CdvdSource;
|
||||||
|
|
||||||
wxMenuItem* cdvd_menu = GetMenuBar()->FindItem(MenuId_Boot_CDVD);
|
wxMenuItem* cdvd_menu = GetMenuBar()->FindItem(MenuId_Boot_CDVD);
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ wxWindowID SwapOrReset_Iso(wxWindow* owner, IScopedCoreThread& core_control, con
|
||||||
}
|
}
|
||||||
wxWindowID result = wxID_CANCEL;
|
wxWindowID result = wxID_CANCEL;
|
||||||
|
|
||||||
if ((g_Conf->CdvdSource == CDVD_SourceType::Iso) && (isoFilename == g_Conf->CurrentIso))
|
if ((EmuConfig.CdvdSource == CDVD_SourceType::Iso) && (isoFilename == EmuConfig.CurrentIso))
|
||||||
{
|
{
|
||||||
core_control.AllowResume();
|
core_control.AllowResume();
|
||||||
return result;
|
return result;
|
||||||
|
@ -226,7 +226,7 @@ wxWindowID SwapOrReset_Iso(wxWindow* owner, IScopedCoreThread& core_control, con
|
||||||
}
|
}
|
||||||
|
|
||||||
g_CDVDReset = true;
|
g_CDVDReset = true;
|
||||||
g_Conf->CdvdSource = CDVD_SourceType::Iso;
|
EmuConfig.CdvdSource = CDVD_SourceType::Iso;
|
||||||
SysUpdateIsoSrcFile(isoFilename);
|
SysUpdateIsoSrcFile(isoFilename);
|
||||||
|
|
||||||
if (result == wxID_RESET)
|
if (result == wxID_RESET)
|
||||||
|
@ -258,7 +258,7 @@ wxWindowID SwapOrReset_Disc(wxWindow* owner, IScopedCoreThread& core, const wxSt
|
||||||
}
|
}
|
||||||
wxWindowID result = wxID_CANCEL;
|
wxWindowID result = wxID_CANCEL;
|
||||||
|
|
||||||
if ((g_Conf->CdvdSource == CDVD_SourceType::Disc) && (driveLetter == g_Conf->Folders.RunDisc))
|
if ((EmuConfig.CdvdSource == CDVD_SourceType::Disc) && (driveLetter == EmuConfig.CurrentDiscDrive))
|
||||||
{
|
{
|
||||||
core.AllowResume();
|
core.AllowResume();
|
||||||
return result;
|
return result;
|
||||||
|
@ -286,7 +286,7 @@ wxWindowID SwapOrReset_Disc(wxWindow* owner, IScopedCoreThread& core, const wxSt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Conf->CdvdSource = CDVD_SourceType::Disc;
|
EmuConfig.CdvdSource = CDVD_SourceType::Disc;
|
||||||
SysUpdateDiscSrcDrive(driveLetter);
|
SysUpdateDiscSrcDrive(driveLetter);
|
||||||
if (result == wxID_RESET)
|
if (result == wxID_RESET)
|
||||||
{
|
{
|
||||||
|
@ -309,7 +309,7 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
|
||||||
wxMessageBox("Please close the GS debugger first before playing a game", _("GS Debugger"), wxICON_ERROR);
|
wxMessageBox("Please close the GS debugger first before playing a game", _("GS Debugger"), wxICON_ERROR);
|
||||||
return wxID_CANCEL;
|
return wxID_CANCEL;
|
||||||
}
|
}
|
||||||
if (newsrc == g_Conf->CdvdSource)
|
if (newsrc == EmuConfig.CdvdSource)
|
||||||
return wxID_CANCEL;
|
return wxID_CANCEL;
|
||||||
wxWindowID result = wxID_CANCEL;
|
wxWindowID result = wxID_CANCEL;
|
||||||
ScopedCoreThreadPopup core;
|
ScopedCoreThreadPopup core;
|
||||||
|
@ -320,7 +320,7 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
|
||||||
|
|
||||||
wxString changeMsg;
|
wxString changeMsg;
|
||||||
changeMsg.Printf(_("You've selected to switch the CDVD source from %s to %s."),
|
changeMsg.Printf(_("You've selected to switch the CDVD source from %s to %s."),
|
||||||
CDVD_SourceLabels[enum_cast(g_Conf->CdvdSource)], CDVD_SourceLabels[enum_cast(newsrc)]);
|
CDVD_SourceLabels[enum_cast(EmuConfig.CdvdSource)], CDVD_SourceLabels[enum_cast(newsrc)]);
|
||||||
|
|
||||||
dialog += dialog.Heading(changeMsg + L"\n\n" +
|
dialog += dialog.Heading(changeMsg + L"\n\n" +
|
||||||
_("Do you want to swap discs or boot the new image (system reset)?"));
|
_("Do you want to swap discs or boot the new image (system reset)?"));
|
||||||
|
@ -341,8 +341,8 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_CDVDReset = true;
|
g_CDVDReset = true;
|
||||||
CDVD_SourceType oldsrc = g_Conf->CdvdSource;
|
CDVD_SourceType oldsrc = EmuConfig.CdvdSource;
|
||||||
g_Conf->CdvdSource = newsrc;
|
EmuConfig.CdvdSource = newsrc;
|
||||||
|
|
||||||
if (result != wxID_RESET)
|
if (result != wxID_RESET)
|
||||||
{
|
{
|
||||||
|
@ -356,7 +356,7 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
core.DisallowResume();
|
core.DisallowResume();
|
||||||
sApp.SysExecute(g_Conf->CdvdSource);
|
sApp.SysExecute(EmuConfig.CdvdSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -436,7 +436,7 @@ bool MainEmuFrame::_DoSelectELFBrowser()
|
||||||
if (ctrl.ShowModal() != wxID_CANCEL)
|
if (ctrl.ShowModal() != wxID_CANCEL)
|
||||||
{
|
{
|
||||||
g_Conf->Folders.RunELF = wxFileName(ctrl.GetPath()).GetPath();
|
g_Conf->Folders.RunELF = wxFileName(ctrl.GetPath()).GetPath();
|
||||||
g_Conf->CurrentELF = ctrl.GetPath();
|
EmuConfig.CurrentELF = ctrl.GetPath();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,18 +452,18 @@ void MainEmuFrame::_DoBootCdvd()
|
||||||
}
|
}
|
||||||
ScopedCoreThreadPause paused_core;
|
ScopedCoreThreadPause paused_core;
|
||||||
|
|
||||||
if (g_Conf->CdvdSource == CDVD_SourceType::Iso)
|
if (EmuConfig.CdvdSource == CDVD_SourceType::Iso)
|
||||||
{
|
{
|
||||||
bool selector = g_Conf->CurrentIso.IsEmpty();
|
bool selector = EmuConfig.CurrentIso.IsEmpty();
|
||||||
|
|
||||||
if (!selector && !wxFileExists(g_Conf->CurrentIso))
|
if (!selector && !wxFileExists(EmuConfig.CurrentIso))
|
||||||
{
|
{
|
||||||
// User has an iso selected from a previous run, but it doesn't exist anymore.
|
// User has an iso selected from a previous run, but it doesn't exist anymore.
|
||||||
// Issue a courtesy popup and then an Iso Selector to choose a new one.
|
// Issue a courtesy popup and then an Iso Selector to choose a new one.
|
||||||
|
|
||||||
wxDialogWithHelpers dialog(this, _("ISO file not found!"));
|
wxDialogWithHelpers dialog(this, _("ISO file not found!"));
|
||||||
dialog += dialog.Heading(
|
dialog += dialog.Heading(
|
||||||
_("An error occurred while trying to open the file:") + wxString(L"\n\n") + g_Conf->CurrentIso + L"\n\n" +
|
_("An error occurred while trying to open the file:") + wxString(L"\n\n") + EmuConfig.CurrentIso + L"\n\n" +
|
||||||
_("Error: The configured ISO file does not exist. Click OK to select a new ISO source for CDVD."));
|
_("Error: The configured ISO file does not exist. Click OK to select a new ISO source for CDVD."));
|
||||||
|
|
||||||
pxIssueConfirmation(dialog, MsgButtons().OK());
|
pxIssueConfirmation(dialog, MsgButtons().OK());
|
||||||
|
@ -497,7 +497,7 @@ void MainEmuFrame::_DoBootCdvd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sApp.SysExecute(g_Conf->CdvdSource);
|
sApp.SysExecute(EmuConfig.CdvdSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainEmuFrame::Menu_CdvdSource_Click(wxCommandEvent& event)
|
void MainEmuFrame::Menu_CdvdSource_Click(wxCommandEvent& event)
|
||||||
|
@ -576,7 +576,7 @@ void MainEmuFrame::Menu_IsoClear_Click(wxCommandEvent& event)
|
||||||
if (confirmed)
|
if (confirmed)
|
||||||
{
|
{
|
||||||
// If the CDVD mode is not ISO, or the system isn't running, wipe the CurrentIso field in INI file
|
// If the CDVD mode is not ISO, or the system isn't running, wipe the CurrentIso field in INI file
|
||||||
if (g_Conf->CdvdSource != CDVD_SourceType::Iso || !SysHasValidState())
|
if (EmuConfig.CdvdSource != CDVD_SourceType::Iso || !SysHasValidState())
|
||||||
SysUpdateIsoSrcFile("");
|
SysUpdateIsoSrcFile("");
|
||||||
wxGetApp().GetRecentIsoManager().Clear();
|
wxGetApp().GetRecentIsoManager().Clear();
|
||||||
AppSaveSettings();
|
AppSaveSettings();
|
||||||
|
@ -730,7 +730,7 @@ void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent&)
|
||||||
if (_DoSelectELFBrowser())
|
if (_DoSelectELFBrowser())
|
||||||
{
|
{
|
||||||
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
g_Conf->EmuOptions.UseBOOT2Injection = true;
|
||||||
sApp.SysExecute(g_Conf->CdvdSource, g_Conf->CurrentELF);
|
sApp.SysExecute(EmuConfig.CdvdSource, EmuConfig.CurrentELF);
|
||||||
}
|
}
|
||||||
|
|
||||||
stopped_core.AllowResume();
|
stopped_core.AllowResume();
|
||||||
|
|
|
@ -137,7 +137,7 @@ void Panels::BiosSelectorPanel::Apply()
|
||||||
.SetUserMsg(pxE(L"Please select a valid BIOS. If you are unable to make a valid selection then press Cancel to close the Configuration panel."));
|
.SetUserMsg(pxE(L"Please select a valid BIOS. If you are unable to make a valid selection then press Cancel to close the Configuration panel."));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Conf->BaseFilenames.Bios = (*m_BiosList)[(sptr)m_ComboBox->GetClientData(sel)];
|
g_Conf->EmuOptions.BaseFilenames.Bios = (*m_BiosList)[(sptr)m_ComboBox->GetClientData(sel)];
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panels::BiosSelectorPanel::AppStatusEvent_OnSettingsApplied()
|
void Panels::BiosSelectorPanel::AppStatusEvent_OnSettingsApplied()
|
||||||
|
@ -203,7 +203,7 @@ void Panels::BiosSelectorPanel::OnEnumComplete(wxCommandEvent& evt)
|
||||||
if (m_EnumeratorThread.get() != enumThread || m_BiosList->size() < enumThread->Result.size())
|
if (m_EnumeratorThread.get() != enumThread || m_BiosList->size() < enumThread->Result.size())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const wxFileName& currentBios = g_Conf->FullpathToBios();
|
const wxFileName& currentBios = g_Conf->EmuOptions.FullpathToBios();
|
||||||
m_ComboBox->Clear(); // Clear the "Enumerating BIOSes..."
|
m_ComboBox->Clear(); // Clear the "Enumerating BIOSes..."
|
||||||
|
|
||||||
for (const std::pair<wxString, u32>& result : enumThread->Result)
|
for (const std::pair<wxString, u32>& result : enumThread->Result)
|
||||||
|
|
|
@ -68,7 +68,7 @@ void RecentIsoManager::OnChangedSelection( wxCommandEvent& evt )
|
||||||
// Actually there is no change on the selection so the event can be skip
|
// Actually there is no change on the selection so the event can be skip
|
||||||
// Note: It also avoids a deadlock which appears when the core thread is already paused
|
// Note: It also avoids a deadlock which appears when the core thread is already paused
|
||||||
// and ScopedCoreThreadPopup try to stop the thread (GSOpen1 code path)
|
// and ScopedCoreThreadPopup try to stop the thread (GSOpen1 code path)
|
||||||
if( (g_Conf->CdvdSource == CDVD_SourceType::Iso) && (m_Items[i].Filename == g_Conf->CurrentIso) )
|
if( (EmuConfig.CdvdSource == CDVD_SourceType::Iso) && (m_Items[i].Filename == EmuConfig.CurrentIso) )
|
||||||
{
|
{
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
return;
|
return;
|
||||||
|
@ -224,7 +224,7 @@ void RecentIsoManager::LoadListFrom( IniInterface& ini )
|
||||||
ini.Entry( pxsFmt( L"Filename%02d", i ), loadtmp, loadtmp, true );
|
ini.Entry( pxsFmt( L"Filename%02d", i ), loadtmp, loadtmp, true );
|
||||||
if( loadtmp.GetFullName()!=L"" ) Add( loadtmp.GetFullPath() );
|
if( loadtmp.GetFullName()!=L"" ) Add( loadtmp.GetFullPath() );
|
||||||
}
|
}
|
||||||
Add( g_Conf->CurrentIso );
|
Add(EmuConfig.CurrentIso );
|
||||||
|
|
||||||
ini.GetConfig().SetRecordDefaults( true );
|
ini.GetConfig().SetRecordDefaults( true );
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
#include "common/pxStreams.h"
|
#include "common/pxStreams.h"
|
||||||
#include "wx/ffile.h"
|
#include "wx/ffile.h"
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
// FIXME: Temporary hack until we remove dependence on Pcsx2App.
|
|
||||||
#include "gui/AppConfig.h"
|
|
||||||
#include "wx/mstream.h"
|
#include "wx/mstream.h"
|
||||||
#include "wx/wfstream.h"
|
#include "wx/wfstream.h"
|
||||||
|
|
||||||
|
@ -189,7 +187,7 @@ static void LoadExtraRom( const wxChar* ext, u8 (&dest)[_size] )
|
||||||
s64 filesize = 0;
|
s64 filesize = 0;
|
||||||
|
|
||||||
// Try first a basic extension concatenation (normally results in something like name.bin.rom1)
|
// Try first a basic extension concatenation (normally results in something like name.bin.rom1)
|
||||||
const wxString Bios( g_Conf->FullpathToBios() );
|
const wxString Bios( EmuConfig.FullpathToBios() );
|
||||||
Bios1.Printf( L"%s.%s", WX_STR(Bios), ext);
|
Bios1.Printf( L"%s.%s", WX_STR(Bios), ext);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -259,8 +257,8 @@ void LoadBIOS()
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
wxString Bios( g_Conf->FullpathToBios() );
|
wxString Bios( EmuConfig.FullpathToBios() );
|
||||||
if( !g_Conf->BaseFilenames.Bios.IsOk() || g_Conf->BaseFilenames.Bios.IsDir() )
|
if( !EmuConfig.BaseFilenames.Bios.IsOk() || EmuConfig.BaseFilenames.Bios.IsDir() )
|
||||||
throw Exception::FileNotFound( Bios )
|
throw Exception::FileNotFound( Bios )
|
||||||
.SetDiagMsg(L"BIOS has not been configured, or the configuration has been corrupted.")
|
.SetDiagMsg(L"BIOS has not been configured, or the configuration has been corrupted.")
|
||||||
.SetUserMsg(_("The PS2 BIOS could not be loaded. The BIOS has not been configured, or the configuration has been corrupted. Please re-configure."));
|
.SetUserMsg(_("The PS2 BIOS could not be loaded. The BIOS has not been configured, or the configuration has been corrupted. Please re-configure."));
|
||||||
|
@ -301,8 +299,8 @@ void LoadBIOS()
|
||||||
LoadExtraRom( L"rom2", eeMem->ROM2 );
|
LoadExtraRom( L"rom2", eeMem->ROM2 );
|
||||||
LoadExtraRom( L"erom", eeMem->EROM );
|
LoadExtraRom( L"erom", eeMem->EROM );
|
||||||
|
|
||||||
if (g_Conf->CurrentIRX.Length() > 3)
|
if (EmuConfig.CurrentIRX.Length() > 3)
|
||||||
LoadIrx(g_Conf->CurrentIRX, &eeMem->ROM[0x3C0000]);
|
LoadIrx(EmuConfig.CurrentIRX, &eeMem->ROM[0x3C0000]);
|
||||||
|
|
||||||
CurrentBiosInformation.threadListAddr = 0;
|
CurrentBiosInformation.threadListAddr = 0;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +316,7 @@ void LoadBIOS()
|
||||||
|
|
||||||
bool IsBIOS(const wxString& filename, wxString& description)
|
bool IsBIOS(const wxString& filename, wxString& description)
|
||||||
{
|
{
|
||||||
wxFileName Bios( g_Conf->Folders.Bios + filename );
|
wxFileName Bios( EmuConfig.Folders.Bios + filename );
|
||||||
pxInputStream inway( filename, new wxFFileInputStream( filename ) );
|
pxInputStream inway( filename, new wxFFileInputStream( filename ) );
|
||||||
|
|
||||||
if (!inway.IsOk()) return false;
|
if (!inway.IsOk()) return false;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "IopCommon.h"
|
#include "IopCommon.h"
|
||||||
#include "iCore.h"
|
#include "iCore.h"
|
||||||
|
|
||||||
#include "gui/AppConfig.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#include "common/Perf.h"
|
#include "common/Perf.h"
|
||||||
#include "DebugTools/Breakpoints.h"
|
#include "DebugTools/Breakpoints.h"
|
||||||
|
@ -229,9 +229,9 @@ static void iIopDumpBlock(int startpc, u8* ptr)
|
||||||
int numused, count;
|
int numused, count;
|
||||||
|
|
||||||
Console.WriteLn("dump1 %x:%x, %x", startpc, psxpc, psxRegs.cycle);
|
Console.WriteLn("dump1 %x:%x, %x", startpc, psxpc, psxRegs.cycle);
|
||||||
g_Conf->Folders.Logs.Mkdir();
|
EmuConfig.Folders.Logs.Mkdir();
|
||||||
|
|
||||||
wxString filename(Path::Combine(g_Conf->Folders.Logs, wxsFormat(L"psxdump%.8X.txt", startpc)));
|
wxString filename(Path::Combine(EmuConfig.Folders.Logs, wxsFormat(L"psxdump%.8X.txt", startpc)));
|
||||||
AsciiFile f(filename, L"w");
|
AsciiFile f(filename, L"w");
|
||||||
|
|
||||||
f.Printf("Dump PSX register data: 0x%x\n\n", (uptr)&psxRegs);
|
f.Printf("Dump PSX register data: 0x%x\n\n", (uptr)&psxRegs);
|
||||||
|
@ -1300,7 +1300,7 @@ static void __fastcall iopRecRecompile(const u32 startpc)
|
||||||
u32 willbranch3 = 0;
|
u32 willbranch3 = 0;
|
||||||
|
|
||||||
// Inject IRX hack
|
// Inject IRX hack
|
||||||
if (startpc == 0x1630 && g_Conf->CurrentIRX.Length() > 3)
|
if (startpc == 0x1630 && EmuConfig.CurrentIRX.Length() > 3)
|
||||||
{
|
{
|
||||||
if (iopMemRead32(0x20018) == 0x1F)
|
if (iopMemRead32(0x20018) == 0x1F)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Utilities/AsciiFile.h"
|
#include "Utilities/AsciiFile.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
// writes text directly to mVU.logFile, no newlines appended.
|
// writes text directly to mVU.logFile, no newlines appended.
|
||||||
_mVUt void __mVULog(const char* fmt, ...)
|
_mVUt void __mVULog(const char* fmt, ...)
|
||||||
|
@ -58,7 +59,7 @@ void __mVUdumpProgram(microVU& mVU, microProgram& prog)
|
||||||
mVUbranch = 0;
|
mVUbranch = 0;
|
||||||
|
|
||||||
const wxString logname(wxsFormat(L"microVU%d prog - %02d.html", mVU.index, prog.idx));
|
const wxString logname(wxsFormat(L"microVU%d prog - %02d.html", mVU.index, prog.idx));
|
||||||
mVU.logFile = std::unique_ptr<AsciiFile>(new AsciiFile(Path::Combine(g_Conf->Folders.Logs, logname), L"w"));
|
mVU.logFile = std::unique_ptr<AsciiFile>(new AsciiFile(Path::Combine(EmuConfig.Folders.Logs, logname), L"w"));
|
||||||
|
|
||||||
mVUlog("<html>\n");
|
mVUlog("<html>\n");
|
||||||
mVUlog("<title>microVU%d MicroProgram Log</title>\n", mVU.index);
|
mVUlog("<title>microVU%d MicroProgram Log</title>\n", mVU.index);
|
||||||
|
|
Loading…
Reference in New Issue