Options: merge SCoreStartupParameter into SConfig

This commit is contained in:
degasus 2015-06-12 13:56:53 +02:00
parent b9a9fcd26d
commit c375111076
114 changed files with 1100 additions and 1163 deletions

View File

@ -129,7 +129,7 @@ void OpenALStream::SoundLoop()
{
Common::SetCurrentThreadName("Audio thread - openal");
bool surround_capable = SConfig::GetInstance().m_LocalCoreStartupParameter.bDPL2Decoder;
bool surround_capable = SConfig::GetInstance().bDPL2Decoder;
#if defined(__APPLE__)
bool float32_capable = false;
const ALenum AL_FORMAT_STEREO_FLOAT32 = 0;
@ -141,7 +141,7 @@ void OpenALStream::SoundLoop()
#endif
u32 ulFrequency = m_mixer->GetSampleRate();
numBuffers = SConfig::GetInstance().m_LocalCoreStartupParameter.iLatency + 2; // OpenAL requires a minimum of two buffers
numBuffers = SConfig::GetInstance().iLatency + 2; // OpenAL requires a minimum of two buffers
memset(uiBuffers, 0, numBuffers * sizeof(ALuint));
uiSource = 0;

View File

@ -21,7 +21,7 @@ PulseAudio::PulseAudio()
bool PulseAudio::Start()
{
m_stereo = !SConfig::GetInstance().m_LocalCoreStartupParameter.bDPL2Decoder;
m_stereo = !SConfig::GetInstance().bDPL2Decoder;
m_channels = m_stereo ? 2 : 5; // will tell PA we use a Stereo or 5.0 channel setup
NOTICE_LOG(AUDIO, "PulseAudio backend using %d channels", m_channels);

View File

@ -105,7 +105,7 @@ struct ARAddr
void LoadCodes(const IniFile& globalIni, const IniFile& localIni, bool forceLoad)
{
// Parses the Action Replay section of a game ini file.
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats &&
if (!SConfig::GetInstance().bEnableCheats &&
!forceLoad)
return;
@ -276,8 +276,8 @@ void SetARCode_IsActive(bool active, size_t index)
void UpdateActiveList()
{
bool old_value = SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats;
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats = false;
bool old_value = SConfig::GetInstance().bEnableCheats;
SConfig::GetInstance().bEnableCheats = false;
b_RanOnce = false;
activeCodes.clear();
for (auto& arCode : arCodes)
@ -285,7 +285,7 @@ void UpdateActiveList()
if (arCode.active)
activeCodes.push_back(arCode);
}
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats = old_value;
SConfig::GetInstance().bEnableCheats = old_value;
}
void EnableSelfLogging(bool enable)
@ -760,7 +760,7 @@ static bool ConditionalCode(const ARAddr& addr, const u32 data, int* const pSkip
void RunAllActive()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
if (SConfig::GetInstance().bEnableCheats)
{
for (auto& activeCode : activeCodes)
{

View File

@ -12,7 +12,6 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/PatchEngine.h"
#include "Core/Boot/Boot.h"
@ -75,10 +74,10 @@ bool CBoot::FindMapFile(std::string* existing_map_file,
std::string title_id_str;
size_t name_begin_index;
SCoreStartupParameter& _StartupPara = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& _StartupPara = SConfig::GetInstance();
switch (_StartupPara.m_BootType)
{
case SCoreStartupParameter::BOOT_WII_NAND:
case SConfig::BOOT_WII_NAND:
{
const DiscIO::INANDContentLoader& Loader =
DiscIO::CNANDContentManager::Access().GetNANDLoader(_StartupPara.m_strFilename);
@ -92,8 +91,8 @@ bool CBoot::FindMapFile(std::string* existing_map_file,
break;
}
case SCoreStartupParameter::BOOT_ELF:
case SCoreStartupParameter::BOOT_DOL:
case SConfig::BOOT_ELF:
case SConfig::BOOT_DOL:
// Strip the .elf/.dol file extension and directories before the name
name_begin_index = _StartupPara.m_strFilename.find_last_of("/") + 1;
if ((_StartupPara.m_strFilename.find_last_of("\\") + 1) > name_begin_index)
@ -220,8 +219,7 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename)
// Third boot step after BootManager and Core. See Call schedule in BootManager.cpp
bool CBoot::BootUp()
{
SCoreStartupParameter& _StartupPara =
SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& _StartupPara = SConfig::GetInstance();
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strFilename.c_str());
@ -234,7 +232,7 @@ bool CBoot::BootUp()
switch (_StartupPara.m_BootType)
{
// GCM and Wii
case SCoreStartupParameter::BOOT_ISO:
case SConfig::BOOT_ISO:
{
DVDInterface::SetVolumeName(_StartupPara.m_strFilename);
DVDInterface::SetDiscInside(DVDInterface::VolumeIsValid());
@ -299,7 +297,7 @@ bool CBoot::BootUp()
}
// DOL
case SCoreStartupParameter::BOOT_DOL:
case SConfig::BOOT_DOL:
{
CDolLoader dolLoader(_StartupPara.m_strFilename);
if (!dolLoader.IsValid())
@ -366,7 +364,7 @@ bool CBoot::BootUp()
}
// ELF
case SCoreStartupParameter::BOOT_ELF:
case SConfig::BOOT_ELF:
{
// load image or create virtual drive from directory
if (!_StartupPara.m_strDVDRoot.empty())
@ -402,7 +400,7 @@ bool CBoot::BootUp()
}
// Wii WAD
case SCoreStartupParameter::BOOT_WII_NAND:
case SConfig::BOOT_WII_NAND:
Boot_WiiWAD(_StartupPara.m_strFilename);
if (LoadMapFromFilename())
@ -419,7 +417,7 @@ bool CBoot::BootUp()
// Bootstrap 2 (AKA: Initial Program Loader, "BIOS")
case SCoreStartupParameter::BOOT_BS2:
case SConfig::BOOT_BS2:
{
DVDInterface::SetDiscInside(DVDInterface::VolumeIsValid());
if (Load_BS2(_StartupPara.m_strBootROM))
@ -434,7 +432,7 @@ bool CBoot::BootUp()
break;
}
case SCoreStartupParameter::BOOT_DFF:
case SConfig::BOOT_DFF:
// do nothing
break;
@ -446,7 +444,7 @@ bool CBoot::BootUp()
}
// HLE jump to loader (homebrew). Disabled when Gecko is active as it interferes with the code handler
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
if (!SConfig::GetInstance().bEnableCheats)
{
HLE::Patch(0x80001800, "HBReload");
Memory::CopyToEmu(0x00001804, "STUBHAXX", 8);

View File

@ -63,7 +63,7 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
// TODO determine why some games fail when using a retail ID. (Seem to take different EXI paths, see Ikaruga for example)
PowerPC::HostWrite_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see YAGCD 4.2.1.1.2
PowerPC::HostWrite_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC
PowerPC::HostWrite_U32(SConfig::GetInstance().bNTSC
? 0 : 1, 0x800000CC); // Fake the VI Init of the IPL (YAGCD 4.2.1.4)
PowerPC::HostWrite_U32(0x01000000, 0x800000d0); // ARAM Size. 16MB main + 4/16/32MB external (retail consoles have no external ARAM)
@ -95,7 +95,7 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
DVDInterface::DVDRead(iAppLoaderOffset + 0x20, 0x01200000, iAppLoaderSize, false);
// Setup pointers like real BS2 does
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC)
if (SConfig::GetInstance().bNTSC)
{
PowerPC::ppcState.gpr[1] = 0x81566550; // StackPointer, used to be set to 0x816ffff0
PowerPC::ppcState.gpr[2] = 0x81465cc0; // Global pointer to Small Data Area 2 Base (haven't seen anything use it...meh)
@ -294,7 +294,7 @@ bool CBoot::SetupWiiMemory(DiscIO::IVolume::ECountry country)
Memory::Write_U32(0x80000000, 0x00003184); // GameID Address
// Fake the VI Init of the IPL
Memory::Write_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC ? 0 : 1, 0x000000CC);
Memory::Write_U32(SConfig::GetInstance().bNTSC ? 0 : 1, 0x000000CC);
// Clear exception handler. Why? Don't we begin with only zeros?
for (int i = 0x3000; i <= 0x3038; i += 4)

View File

@ -77,12 +77,12 @@ static GPUDeterminismMode ParseGPUDeterminismMode(const std::string& mode)
// Boot the ISO or file
bool BootCore(const std::string& _rFilename)
{
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& StartUp = SConfig::GetInstance();
// Use custom settings for debugging mode
Host_SetStartupDebuggingParameters();
StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO;
StartUp.m_BootType = SConfig::BOOT_ISO;
StartUp.m_strFilename = _rFilename;
SConfig::GetInstance().m_LastFilename = _rFilename;
SConfig::GetInstance().SaveSettings();
@ -93,7 +93,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.bHLE_BS2 = StartUp.bHLE_BS2;
// If for example the ISO file is bad we return here
if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT))
if (!StartUp.AutoSetup(SConfig::BOOT_DEFAULT))
return false;
// Load game specific settings
@ -272,7 +272,7 @@ void Stop()
{
Core::Stop();
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& StartUp = SConfig::GetInstance();
StartUp.m_strUniqueID = "00000000";
if (config_cache.valid)

View File

@ -3,7 +3,6 @@ set(SRCS ActionReplay.cpp
BootManager.cpp
ConfigManager.cpp
Core.cpp
CoreParameter.cpp
CoreTiming.cpp
DSPEmulator.cpp
ec_wii.cpp

View File

@ -2,19 +2,61 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include <cinttypes>
#include <memory>
#include "Common/CDUtils.h"
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h" // for bWii
#include "Core/Boot/Boot.h"
#include "Core/Boot/Boot_DOL.h"
#include "Core/FifoPlayer/FifoDataFile.h"
#include "Core/HW/SI.h"
#include "Core/PowerPC/PowerPC.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/VolumeCreator.h"
SConfig* SConfig::m_Instance;
SConfig::SConfig()
: bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false),
bJITNoBlockCache(false), bJITNoBlockLinking(false),
bJITOff(false),
bJITLoadStoreOff(false), bJITLoadStorelXzOff(false),
bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),
bJITLoadStoreFloatingOff(false), bJITLoadStorePairedOff(false),
bJITFloatingPointOff(false), bJITIntegerOff(false),
bJITPairedOff(false), bJITSystemRegistersOff(false),
bJITBranchOff(false),
bJITILTimeProfiling(false), bJITILOutputIR(false),
bFPRF(false), bAccurateNaNs(false),
bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bSyncGPUOnSkipIdleHack(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bEnableCheats(false),
bEnableMemcardSaving(true),
bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), bDCBZOFF(false),
iBBDumpPort(0),
bFastDiscSpeed(false), bSyncGPU(false),
SelectedLanguage(0), bOverrideGCLanguage(false), bWii(false),
bConfirmStop(false), bHideCursor(false),
bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
iRenderWindowWidth(640), iRenderWindowHeight(480),
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
bFullscreen(false), bRenderToMain(false),
bProgressive(false), bDisableScreenSaver(false),
iPosX(100), iPosY(100), iWidth(800), iHeight(600),
bLoopFifoReplay(true)
{
LoadDefaults();
// Make sure we have log manager
LoadSettings();
}
@ -88,9 +130,9 @@ void SConfig::SaveGeneralSettings(IniFile& ini)
#ifdef USE_GDBSTUB
#ifndef _WIN32
general->Set("GDBSocket", m_LocalCoreStartupParameter.gdb_socket);
general->Set("GDBSocket", gdb_socket);
#endif
general->Set("GDBPort", m_LocalCoreStartupParameter.iGDBPort);
general->Set("GDBPort", iGDBPort);
#endif
}
@ -98,22 +140,22 @@ void SConfig::SaveInterfaceSettings(IniFile& ini)
{
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
interface->Set("ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
interface->Set("UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
interface->Set("OnScreenDisplayMessages", m_LocalCoreStartupParameter.bOnScreenDisplayMessages);
interface->Set("HideCursor", m_LocalCoreStartupParameter.bHideCursor);
interface->Set("AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
interface->Set("MainWindowPosX", (m_LocalCoreStartupParameter.iPosX == -32000) ? 0 : m_LocalCoreStartupParameter.iPosX); // TODO - HAX
interface->Set("MainWindowPosY", (m_LocalCoreStartupParameter.iPosY == -32000) ? 0 : m_LocalCoreStartupParameter.iPosY); // TODO - HAX
interface->Set("MainWindowWidth", m_LocalCoreStartupParameter.iWidth);
interface->Set("MainWindowHeight", m_LocalCoreStartupParameter.iHeight);
interface->Set("ConfirmStop", bConfirmStop);
interface->Set("UsePanicHandlers", bUsePanicHandlers);
interface->Set("OnScreenDisplayMessages", bOnScreenDisplayMessages);
interface->Set("HideCursor", bHideCursor);
interface->Set("AutoHideCursor", bAutoHideCursor);
interface->Set("MainWindowPosX", (iPosX == -32000) ? 0 : iPosX); // TODO - HAX
interface->Set("MainWindowPosY", (iPosY == -32000) ? 0 : iPosY); // TODO - HAX
interface->Set("MainWindowWidth", iWidth);
interface->Set("MainWindowHeight", iHeight);
interface->Set("Language", m_InterfaceLanguage);
interface->Set("ShowToolbar", m_InterfaceToolbar);
interface->Set("ShowStatusbar", m_InterfaceStatusbar);
interface->Set("ShowLogWindow", m_InterfaceLogWindow);
interface->Set("ShowLogConfigWindow", m_InterfaceLogConfigWindow);
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
interface->Set("ThemeName40", m_LocalCoreStartupParameter.theme_name);
interface->Set("ThemeName40", theme_name);
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
}
@ -121,18 +163,18 @@ void SConfig::SaveDisplaySettings(IniFile& ini)
{
IniFile::Section* display = ini.GetOrCreateSection("Display");
display->Set("FullscreenResolution", m_LocalCoreStartupParameter.strFullscreenResolution);
display->Set("Fullscreen", m_LocalCoreStartupParameter.bFullscreen);
display->Set("RenderToMain", m_LocalCoreStartupParameter.bRenderToMain);
display->Set("RenderWindowXPos", m_LocalCoreStartupParameter.iRenderWindowXPos);
display->Set("RenderWindowYPos", m_LocalCoreStartupParameter.iRenderWindowYPos);
display->Set("RenderWindowWidth", m_LocalCoreStartupParameter.iRenderWindowWidth);
display->Set("RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight);
display->Set("RenderWindowAutoSize", m_LocalCoreStartupParameter.bRenderWindowAutoSize);
display->Set("KeepWindowOnTop", m_LocalCoreStartupParameter.bKeepWindowOnTop);
display->Set("ProgressiveScan", m_LocalCoreStartupParameter.bProgressive);
display->Set("DisableScreenSaver", m_LocalCoreStartupParameter.bDisableScreenSaver);
display->Set("ForceNTSCJ", m_LocalCoreStartupParameter.bForceNTSCJ);
display->Set("FullscreenResolution", strFullscreenResolution);
display->Set("Fullscreen", bFullscreen);
display->Set("RenderToMain", bRenderToMain);
display->Set("RenderWindowXPos", iRenderWindowXPos);
display->Set("RenderWindowYPos", iRenderWindowYPos);
display->Set("RenderWindowWidth", iRenderWindowWidth);
display->Set("RenderWindowHeight", iRenderWindowHeight);
display->Set("RenderWindowAutoSize", bRenderWindowAutoSize);
display->Set("KeepWindowOnTop", bKeepWindowOnTop);
display->Set("ProgressiveScan", bProgressive);
display->Set("DisableScreenSaver", bDisableScreenSaver);
display->Set("ForceNTSCJ", bForceNTSCJ);
}
void SConfig::SaveGameListSettings(IniFile& ini)
@ -175,25 +217,25 @@ void SConfig::SaveCoreSettings(IniFile& ini)
{
IniFile::Section* core = ini.GetOrCreateSection("Core");
core->Set("HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
core->Set("CPUCore", m_LocalCoreStartupParameter.iCPUCore);
core->Set("Fastmem", m_LocalCoreStartupParameter.bFastmem);
core->Set("CPUThread", m_LocalCoreStartupParameter.bCPUThread);
core->Set("DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
core->Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
core->Set("SyncOnSkipIdle", m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack);
core->Set("SyncGPU", m_LocalCoreStartupParameter.bSyncGPU);
core->Set("SyncGpuMaxDistance", m_LocalCoreStartupParameter.iSyncGpuMaxDistance);
core->Set("SyncGpuMinDistance", m_LocalCoreStartupParameter.iSyncGpuMinDistance);
core->Set("SyncGpuOverclock", m_LocalCoreStartupParameter.fSyncGpuOverclock);
core->Set("DefaultISO", m_LocalCoreStartupParameter.m_strDefaultISO);
core->Set("DVDRoot", m_LocalCoreStartupParameter.m_strDVDRoot);
core->Set("Apploader", m_LocalCoreStartupParameter.m_strApploader);
core->Set("EnableCheats", m_LocalCoreStartupParameter.bEnableCheats);
core->Set("SelectedLanguage", m_LocalCoreStartupParameter.SelectedLanguage);
core->Set("OverrideGCLang", m_LocalCoreStartupParameter.bOverrideGCLanguage);
core->Set("DPL2Decoder", m_LocalCoreStartupParameter.bDPL2Decoder);
core->Set("Latency", m_LocalCoreStartupParameter.iLatency);
core->Set("HLE_BS2", bHLE_BS2);
core->Set("CPUCore", iCPUCore);
core->Set("Fastmem", bFastmem);
core->Set("CPUThread", bCPUThread);
core->Set("DSPHLE", bDSPHLE);
core->Set("SkipIdle", bSkipIdle);
core->Set("SyncOnSkipIdle", bSyncGPUOnSkipIdleHack);
core->Set("SyncGPU", bSyncGPU);
core->Set("SyncGpuMaxDistance", iSyncGpuMaxDistance);
core->Set("SyncGpuMinDistance", iSyncGpuMinDistance);
core->Set("SyncGpuOverclock", fSyncGpuOverclock);
core->Set("DefaultISO", m_strDefaultISO);
core->Set("DVDRoot", m_strDVDRoot);
core->Set("Apploader", m_strApploader);
core->Set("EnableCheats", bEnableCheats);
core->Set("SelectedLanguage", SelectedLanguage);
core->Set("OverrideGCLang", bOverrideGCLanguage);
core->Set("DPL2Decoder", bDPL2Decoder);
core->Set("Latency", iLatency);
core->Set("MemcardAPath", m_strMemoryCardA);
core->Set("MemcardBPath", m_strMemoryCardB);
core->Set("AgpCartAPath", m_strGbaCartA);
@ -210,14 +252,14 @@ void SConfig::SaveCoreSettings(IniFile& ini)
core->Set("WiiKeyboard", m_WiiKeyboard);
core->Set("WiimoteContinuousScanning", m_WiimoteContinuousScanning);
core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker);
core->Set("RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
core->Set("RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
core->Set("RunCompareServer", bRunCompareServer);
core->Set("RunCompareClient", bRunCompareClient);
core->Set("FrameLimit", m_Framelimit);
core->Set("FrameSkip", m_FrameSkip);
core->Set("Overclock", m_OCFactor);
core->Set("OverclockEnable", m_OCEnable);
core->Set("GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
core->Set("GPUDeterminismMode", m_LocalCoreStartupParameter.m_strGPUDeterminismMode);
core->Set("GFXBackend", m_strVideoBackend);
core->Set("GPUDeterminismMode", m_strGPUDeterminismMode);
core->Set("GameCubeAdapter", m_GameCubeAdapter);
core->Set("AdapterRumble", m_AdapterRumble);
}
@ -255,7 +297,7 @@ void SConfig::SaveFifoPlayerSettings(IniFile& ini)
{
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
fifoplayer->Set("LoopReplay", m_LocalCoreStartupParameter.bLoopFifoReplay);
fifoplayer->Set("LoopReplay", bLoopFifoReplay);
}
void SConfig::LoadSettings()
@ -286,9 +328,9 @@ void SConfig::LoadGeneralSettings(IniFile& ini)
general->Get("ShowFrameCount", &m_ShowFrameCount, false);
#ifdef USE_GDBSTUB
#ifndef _WIN32
general->Get("GDBSocket", &m_LocalCoreStartupParameter.gdb_socket, "");
general->Get("GDBSocket", &gdb_socket, "");
#endif
general->Get("GDBPort", &(m_LocalCoreStartupParameter.iGDBPort), -1);
general->Get("GDBPort", &(iGDBPort), -1);
#endif
m_ISOFolder.clear();
@ -340,22 +382,22 @@ void SConfig::LoadInterfaceSettings(IniFile& ini)
{
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
interface->Get("ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, true);
interface->Get("UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
interface->Get("OnScreenDisplayMessages", &m_LocalCoreStartupParameter.bOnScreenDisplayMessages, true);
interface->Get("HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
interface->Get("AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
interface->Get("MainWindowPosX", &m_LocalCoreStartupParameter.iPosX, 100);
interface->Get("MainWindowPosY", &m_LocalCoreStartupParameter.iPosY, 100);
interface->Get("MainWindowWidth", &m_LocalCoreStartupParameter.iWidth, 800);
interface->Get("MainWindowHeight", &m_LocalCoreStartupParameter.iHeight, 600);
interface->Get("ConfirmStop", &bConfirmStop, true);
interface->Get("UsePanicHandlers", &bUsePanicHandlers, true);
interface->Get("OnScreenDisplayMessages", &bOnScreenDisplayMessages, true);
interface->Get("HideCursor", &bHideCursor, false);
interface->Get("AutoHideCursor", &bAutoHideCursor, false);
interface->Get("MainWindowPosX", &iPosX, 100);
interface->Get("MainWindowPosY", &iPosY, 100);
interface->Get("MainWindowWidth", &iWidth, 800);
interface->Get("MainWindowHeight", &iHeight, 600);
interface->Get("Language", &m_InterfaceLanguage, 0);
interface->Get("ShowToolbar", &m_InterfaceToolbar, true);
interface->Get("ShowStatusbar", &m_InterfaceStatusbar, true);
interface->Get("ShowLogWindow", &m_InterfaceLogWindow, false);
interface->Get("ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false);
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
interface->Get("ThemeName40", &m_LocalCoreStartupParameter.theme_name, "Clean");
interface->Get("ThemeName40", &theme_name, "Clean");
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
}
@ -363,18 +405,18 @@ void SConfig::LoadDisplaySettings(IniFile& ini)
{
IniFile::Section* display = ini.GetOrCreateSection("Display");
display->Get("Fullscreen", &m_LocalCoreStartupParameter.bFullscreen, false);
display->Get("FullscreenResolution", &m_LocalCoreStartupParameter.strFullscreenResolution, "Auto");
display->Get("RenderToMain", &m_LocalCoreStartupParameter.bRenderToMain, false);
display->Get("RenderWindowXPos", &m_LocalCoreStartupParameter.iRenderWindowXPos, -1);
display->Get("RenderWindowYPos", &m_LocalCoreStartupParameter.iRenderWindowYPos, -1);
display->Get("RenderWindowWidth", &m_LocalCoreStartupParameter.iRenderWindowWidth, 640);
display->Get("RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480);
display->Get("RenderWindowAutoSize", &m_LocalCoreStartupParameter.bRenderWindowAutoSize, false);
display->Get("KeepWindowOnTop", &m_LocalCoreStartupParameter.bKeepWindowOnTop, false);
display->Get("ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, false);
display->Get("DisableScreenSaver", &m_LocalCoreStartupParameter.bDisableScreenSaver, true);
display->Get("ForceNTSCJ", &m_LocalCoreStartupParameter.bForceNTSCJ, false);
display->Get("Fullscreen", &bFullscreen, false);
display->Get("FullscreenResolution", &strFullscreenResolution, "Auto");
display->Get("RenderToMain", &bRenderToMain, false);
display->Get("RenderWindowXPos", &iRenderWindowXPos, -1);
display->Get("RenderWindowYPos", &iRenderWindowYPos, -1);
display->Get("RenderWindowWidth", &iRenderWindowWidth, 640);
display->Get("RenderWindowHeight", &iRenderWindowHeight, 480);
display->Get("RenderWindowAutoSize", &bRenderWindowAutoSize, false);
display->Get("KeepWindowOnTop", &bKeepWindowOnTop, false);
display->Get("ProgressiveScan", &bProgressive, false);
display->Get("DisableScreenSaver", &bDisableScreenSaver, true);
display->Get("ForceNTSCJ", &bForceNTSCJ, false);
}
void SConfig::LoadGameListSettings(IniFile& ini)
@ -420,27 +462,27 @@ void SConfig::LoadCoreSettings(IniFile& ini)
{
IniFile::Section* core = ini.GetOrCreateSection("Core");
core->Get("HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
core->Get("HLE_BS2", &bHLE_BS2, false);
#ifdef _M_X86
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_JIT64);
core->Get("CPUCore", &iCPUCore, PowerPC::CORE_JIT64);
#elif _M_ARM_64
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_JITARM64);
core->Get("CPUCore", &iCPUCore, PowerPC::CORE_JITARM64);
#else
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_INTERPRETER);
core->Get("CPUCore", &iCPUCore, PowerPC::CORE_INTERPRETER);
#endif
core->Get("Fastmem", &m_LocalCoreStartupParameter.bFastmem, true);
core->Get("DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
core->Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
core->Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
core->Get("SyncOnSkipIdle", &m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack, true);
core->Get("DefaultISO", &m_LocalCoreStartupParameter.m_strDefaultISO);
core->Get("DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
core->Get("Apploader", &m_LocalCoreStartupParameter.m_strApploader);
core->Get("EnableCheats", &m_LocalCoreStartupParameter.bEnableCheats, false);
core->Get("SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
core->Get("OverrideGCLang", &m_LocalCoreStartupParameter.bOverrideGCLanguage, false);
core->Get("DPL2Decoder", &m_LocalCoreStartupParameter.bDPL2Decoder, false);
core->Get("Latency", &m_LocalCoreStartupParameter.iLatency, 2);
core->Get("Fastmem", &bFastmem, true);
core->Get("DSPHLE", &bDSPHLE, true);
core->Get("CPUThread", &bCPUThread, true);
core->Get("SkipIdle", &bSkipIdle, true);
core->Get("SyncOnSkipIdle", &bSyncGPUOnSkipIdleHack, true);
core->Get("DefaultISO", &m_strDefaultISO);
core->Get("DVDRoot", &m_strDVDRoot);
core->Get("Apploader", &m_strApploader);
core->Get("EnableCheats", &bEnableCheats, false);
core->Get("SelectedLanguage", &SelectedLanguage, 0);
core->Get("OverrideGCLang", &bOverrideGCLanguage, false);
core->Get("DPL2Decoder", &bDPL2Decoder, false);
core->Get("Latency", &iLatency, 2);
core->Get("MemcardAPath", &m_strMemoryCardA);
core->Get("MemcardBPath", &m_strMemoryCardB);
core->Get("AgpCartAPath", &m_strGbaCartA);
@ -449,8 +491,8 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
core->Get("SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
core->Get("BBA_MAC", &m_bba_mac);
core->Get("TimeProfiling", &m_LocalCoreStartupParameter.bJITILTimeProfiling, false);
core->Get("OutputIR", &m_LocalCoreStartupParameter.bJITILOutputIR, false);
core->Get("TimeProfiling", &bJITILTimeProfiling, false);
core->Get("OutputIR", &bJITILOutputIR, false);
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
{
core->Get(StringFromFormat("SIDevice%i", i), (u32*)&m_SIDevice[i], (i == 0) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE);
@ -459,22 +501,22 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("WiiKeyboard", &m_WiiKeyboard, false);
core->Get("WiimoteContinuousScanning", &m_WiimoteContinuousScanning, false);
core->Get("WiimoteEnableSpeaker", &m_WiimoteEnableSpeaker, false);
core->Get("RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
core->Get("RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
core->Get("MMU", &m_LocalCoreStartupParameter.bMMU, false);
core->Get("BBDumpPort", &m_LocalCoreStartupParameter.iBBDumpPort, -1);
core->Get("SyncGPU", &m_LocalCoreStartupParameter.bSyncGPU, false);
core->Get("SyncGpuMaxDistance", &m_LocalCoreStartupParameter.iSyncGpuMaxDistance, 200000);
core->Get("SyncGpuMinDistance", &m_LocalCoreStartupParameter.iSyncGpuMinDistance, -200000);
core->Get("SyncGpuOverclock", &m_LocalCoreStartupParameter.fSyncGpuOverclock, 1.0);
core->Get("FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
core->Get("DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false);
core->Get("RunCompareServer", &bRunCompareServer, false);
core->Get("RunCompareClient", &bRunCompareClient, false);
core->Get("MMU", &bMMU, false);
core->Get("BBDumpPort", &iBBDumpPort, -1);
core->Get("SyncGPU", &bSyncGPU, false);
core->Get("SyncGpuMaxDistance", &iSyncGpuMaxDistance, 200000);
core->Get("SyncGpuMinDistance", &iSyncGpuMinDistance, -200000);
core->Get("SyncGpuOverclock", &fSyncGpuOverclock, 1.0);
core->Get("FastDiscSpeed", &bFastDiscSpeed, false);
core->Get("DCBZ", &bDCBZOFF, false);
core->Get("FrameLimit", &m_Framelimit, 1); // auto frame limit by default
core->Get("Overclock", &m_OCFactor, 1.0f);
core->Get("OverclockEnable", &m_OCEnable, false);
core->Get("FrameSkip", &m_FrameSkip, 0);
core->Get("GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
core->Get("GPUDeterminismMode", &m_LocalCoreStartupParameter.m_strGPUDeterminismMode, "auto");
core->Get("GFXBackend", &m_strVideoBackend, "");
core->Get("GPUDeterminismMode", &m_strGPUDeterminismMode, "auto");
core->Get("GameCubeAdapter", &m_GameCubeAdapter, true);
core->Get("AdapterRumble", &m_AdapterRumble, true);
}
@ -524,5 +566,398 @@ void SConfig::LoadFifoPlayerSettings(IniFile& ini)
{
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
fifoplayer->Get("LoopReplay", &m_LocalCoreStartupParameter.bLoopFifoReplay, true);
fifoplayer->Get("LoopReplay", &bLoopFifoReplay, true);
}
void SConfig::LoadDefaults()
{
bEnableDebugging = false;
bAutomaticStart = false;
bBootToPause = false;
#ifdef USE_GDBSTUB
iGDBPort = -1;
#ifndef _WIN32
gdb_socket = "";
#endif
#endif
iCPUCore = PowerPC::CORE_JIT64;
bCPUThread = false;
bSkipIdle = false;
bSyncGPUOnSkipIdleHack = true;
bRunCompareServer = false;
bDSPHLE = true;
bFastmem = true;
bFPRF = false;
bAccurateNaNs = false;
bMMU = false;
bDCBZOFF = false;
iBBDumpPort = -1;
bSyncGPU = false;
bFastDiscSpeed = false;
bEnableMemcardSaving = true;
SelectedLanguage = 0;
bOverrideGCLanguage = false;
bWii = false;
bDPL2Decoder = false;
iLatency = 14;
iPosX = 100;
iPosY = 100;
iWidth = 800;
iHeight = 600;
bLoopFifoReplay = true;
bJITOff = false; // debugger only settings
bJITLoadStoreOff = false;
bJITLoadStoreFloatingOff = false;
bJITLoadStorePairedOff = false;
bJITFloatingPointOff = false;
bJITIntegerOff = false;
bJITPairedOff = false;
bJITSystemRegistersOff = false;
m_strName = "NONE";
m_strUniqueID = "00000000";
}
static const char* GetRegionOfCountry(DiscIO::IVolume::ECountry country)
{
switch (country)
{
case DiscIO::IVolume::COUNTRY_USA:
return USA_DIR;
case DiscIO::IVolume::COUNTRY_TAIWAN:
case DiscIO::IVolume::COUNTRY_KOREA:
// TODO: Should these have their own Region Dir?
case DiscIO::IVolume::COUNTRY_JAPAN:
return JAP_DIR;
case DiscIO::IVolume::COUNTRY_AUSTRALIA:
case DiscIO::IVolume::COUNTRY_EUROPE:
case DiscIO::IVolume::COUNTRY_FRANCE:
case DiscIO::IVolume::COUNTRY_GERMANY:
case DiscIO::IVolume::COUNTRY_ITALY:
case DiscIO::IVolume::COUNTRY_NETHERLANDS:
case DiscIO::IVolume::COUNTRY_RUSSIA:
case DiscIO::IVolume::COUNTRY_SPAIN:
case DiscIO::IVolume::COUNTRY_WORLD:
return EUR_DIR;
case DiscIO::IVolume::COUNTRY_UNKNOWN:
default:
return nullptr;
}
}
bool SConfig::AutoSetup(EBootBS2 _BootBS2)
{
std::string set_region_dir(EUR_DIR);
switch (_BootBS2)
{
case BOOT_DEFAULT:
{
bool bootDrive = cdio_is_cdrom(m_strFilename);
// Check if the file exist, we may have gotten it from a --elf command line
// that gave an incorrect file name
if (!bootDrive && !File::Exists(m_strFilename))
{
PanicAlertT("The specified file \"%s\" does not exist", m_strFilename.c_str());
return false;
}
std::string Extension;
SplitPath(m_strFilename, nullptr, nullptr, &Extension);
if (!strcasecmp(Extension.c_str(), ".gcm") ||
!strcasecmp(Extension.c_str(), ".iso") ||
!strcasecmp(Extension.c_str(), ".wbfs") ||
!strcasecmp(Extension.c_str(), ".ciso") ||
!strcasecmp(Extension.c_str(), ".gcz") ||
bootDrive)
{
m_BootType = BOOT_ISO;
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
if (pVolume == nullptr)
{
if (bootDrive)
PanicAlertT("Could not read \"%s\". "
"There is no disc in the drive, or it is not a GC/Wii backup. "
"Please note that original GameCube and Wii discs cannot be read "
"by most PC DVD drives.", m_strFilename.c_str());
else
PanicAlertT("\"%s\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.",
m_strFilename.c_str());
return false;
}
m_strName = pVolume->GetInternalName();
m_strUniqueID = pVolume->GetUniqueID();
m_revision = pVolume->GetRevision();
// Check if we have a Wii disc
bWii = pVolume.get()->GetVolumeType() == DiscIO::IVolume::WII_DISC;
const char* retrieved_region_dir = GetRegionOfCountry(pVolume->GetCountry());
if (!retrieved_region_dir)
{
if (!PanicYesNoT("Your GCM/ISO file seems to be invalid (invalid country)."
"\nContinue with PAL region?"))
return false;
retrieved_region_dir = EUR_DIR;
}
set_region_dir = retrieved_region_dir;
bNTSC = set_region_dir == USA_DIR || set_region_dir == JAP_DIR;
}
else if (!strcasecmp(Extension.c_str(), ".elf"))
{
bWii = CBoot::IsElfWii(m_strFilename);
set_region_dir = USA_DIR;
m_BootType = BOOT_ELF;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dol"))
{
CDolLoader dolfile(m_strFilename);
bWii = dolfile.IsWii();
set_region_dir = USA_DIR;
m_BootType = BOOT_DOL;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dff"))
{
bWii = true;
set_region_dir = USA_DIR;
bNTSC = true;
m_BootType = BOOT_DFF;
std::unique_ptr<FifoDataFile> ddfFile(FifoDataFile::Load(m_strFilename, true));
if (ddfFile)
{
bWii = ddfFile->GetIsWii();
}
}
else if (DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename).IsValid())
{
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
const DiscIO::INANDContentLoader& ContentLoader = DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename);
if (ContentLoader.GetContentByIndex(ContentLoader.GetBootIndex()) == nullptr)
{
//WAD is valid yet cannot be booted. Install instead.
u64 installed = DiscIO::CNANDContentManager::Access().Install_WiiWAD(m_strFilename);
if (installed)
SuccessAlertT("The WAD has been installed successfully");
return false; //do not boot
}
const char* retrieved_region_dir = GetRegionOfCountry(ContentLoader.GetCountry());
set_region_dir = retrieved_region_dir ? retrieved_region_dir : EUR_DIR;
bNTSC = set_region_dir == USA_DIR || set_region_dir == JAP_DIR;
bWii = true;
m_BootType = BOOT_WII_NAND;
if (pVolume)
{
m_strName = pVolume->GetInternalName();
m_strUniqueID = pVolume->GetUniqueID();
}
else
{
// null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
// if this is the second boot we would be using the Name and id of the last title
m_strName.clear();
m_strUniqueID.clear();
}
// Use the TitleIDhex for name and/or unique ID if launching from nand folder
// or if it is not ascii characters (specifically sysmenu could potentially apply to other things)
std::string titleidstr = StringFromFormat("%016" PRIx64, ContentLoader.GetTitleID());
if (m_strName.empty())
{
m_strName = titleidstr;
}
if (m_strUniqueID.empty())
{
m_strUniqueID = titleidstr;
}
}
else
{
PanicAlertT("Could not recognize ISO file %s", m_strFilename.c_str());
return false;
}
}
break;
case BOOT_BS2_USA:
set_region_dir = USA_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BS2_JAP:
set_region_dir = JAP_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BS2_EUR:
set_region_dir = EUR_DIR;
m_strFilename.clear();
bNTSC = false;
break;
}
// Setup paths
CheckMemcardPath(SConfig::GetInstance().m_strMemoryCardA, set_region_dir, true);
CheckMemcardPath(SConfig::GetInstance().m_strMemoryCardB, set_region_dir, false);
m_strSRAM = File::GetUserPath(F_GCSRAM_IDX);
if (!bWii)
{
if (!bHLE_BS2)
{
m_strBootROM = File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
if (!File::Exists(m_strBootROM))
m_strBootROM = File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
if (!File::Exists(m_strBootROM))
{
WARN_LOG(BOOT, "Bootrom file %s not found - using HLE.", m_strBootROM.c_str());
bHLE_BS2 = true;
}
}
}
else if (bWii && !bHLE_BS2)
{
WARN_LOG(BOOT, "GC bootrom file will not be loaded for Wii mode.");
bHLE_BS2 = true;
}
return true;
}
void SConfig::CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA)
{
std::string ext("." + gameRegion + ".raw");
if (memcardPath.empty())
{
// Use default memcard path if there is no user defined name
std::string defaultFilename = isSlotA ? GC_MEMCARDA : GC_MEMCARDB;
memcardPath = File::GetUserPath(D_GCUSER_IDX) + defaultFilename + ext;
}
else
{
std::string filename = memcardPath;
std::string region = filename.substr(filename.size()-7, 3);
bool hasregion = false;
hasregion |= region.compare(USA_DIR) == 0;
hasregion |= region.compare(JAP_DIR) == 0;
hasregion |= region.compare(EUR_DIR) == 0;
if (!hasregion)
{
// filename doesn't have region in the extension
if (File::Exists(filename))
{
// If the old file exists we are polite and ask if we should copy it
std::string oldFilename = filename;
filename.replace(filename.size()-4, 4, ext);
if (PanicYesNoT("Memory Card filename in Slot %c is incorrect\n"
"Region not specified\n\n"
"Slot %c path was changed to\n"
"%s\n"
"Would you like to copy the old file to this new location?\n",
isSlotA ? 'A':'B', isSlotA ? 'A':'B', filename.c_str()))
{
if (!File::Copy(oldFilename, filename))
PanicAlertT("Copy failed");
}
}
memcardPath = filename; // Always correct the path!
}
else if (region.compare(gameRegion) != 0)
{
// filename has region, but it's not == gameRegion
// Just set the correct filename, the EXI Device will create it if it doesn't exist
memcardPath = filename.replace(filename.size()-ext.size(), ext.size(), ext);
}
}
}
DiscIO::IVolume::ELanguage SConfig::GetCurrentLanguage(bool wii) const
{
DiscIO::IVolume::ELanguage language;
if (wii)
language = (DiscIO::IVolume::ELanguage)SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
else
language = (DiscIO::IVolume::ELanguage)(SConfig::GetInstance().SelectedLanguage + 1);
// Get rid of invalid values (probably doesn't matter, but might as well do it)
if (language > DiscIO::IVolume::ELanguage::LANGUAGE_UNKNOWN || language < 0)
language = DiscIO::IVolume::ELanguage::LANGUAGE_UNKNOWN;
return language;
}
IniFile SConfig::LoadDefaultGameIni() const
{
return LoadDefaultGameIni(GetUniqueID(), m_revision);
}
IniFile SConfig::LoadLocalGameIni() const
{
return LoadLocalGameIni(GetUniqueID(), m_revision);
}
IniFile SConfig::LoadGameIni() const
{
return LoadGameIni(GetUniqueID(), m_revision);
}
IniFile SConfig::LoadDefaultGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename, true);
return game_ini;
}
IniFile SConfig::LoadLocalGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
return game_ini;
}
IniFile SConfig::LoadGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename, true);
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
return game_ini;
}
// Returns all possible filenames in ascending order of priority
std::vector<std::string> SConfig::GetGameIniFilenames(const std::string& id, u16 revision)
{
std::vector<std::string> filenames;
// INIs that match all regions
if (id.size() >= 4)
filenames.push_back(id.substr(0, 3) + ".ini");
// Regular INIs
filenames.push_back(id + ".ini");
// INIs with specific revisions
filenames.push_back(id + StringFromFormat("r%d", revision) + ".ini");
return filenames;
}

View File

@ -7,10 +7,11 @@
#include <string>
#include <vector>
#include "Common/IniFile.h"
#include "Common/SysConf.h"
#include "Core/CoreParameter.h"
#include "Core/HW/EXI_Device.h"
#include "Core/HW/SI_Device.h"
#include "DiscIO/Volume.h"
// DSP Backend Types
#define BACKEND_NULLSOUND _trans("No audio output")
@ -21,6 +22,16 @@
#define BACKEND_PULSEAUDIO "Pulse"
#define BACKEND_XAUDIO2 "XAudio2"
#define BACKEND_OPENSLES "OpenSLES"
enum GPUDeterminismMode
{
GPU_DETERMINISM_AUTO,
GPU_DETERMINISM_NONE,
// This is currently the only mode. There will probably be at least
// one more at some point.
GPU_DETERMINISM_FAKE_COMPLETION,
};
struct SConfig : NonCopyable
{
// Wii Devices
@ -36,7 +47,140 @@ struct SConfig : NonCopyable
std::vector<std::string> m_ISOFolder;
bool m_RecursiveISOFolder;
SCoreStartupParameter m_LocalCoreStartupParameter;
// Settings
bool bEnableDebugging;
#ifdef USE_GDBSTUB
int iGDBPort;
#ifndef _WIN32
std::string gdb_socket;
#endif
#endif
bool bAutomaticStart;
bool bBootToPause;
int iCPUCore;
// JIT (shared between JIT and JITIL)
bool bJITNoBlockCache, bJITNoBlockLinking;
bool bJITOff;
bool bJITLoadStoreOff, bJITLoadStorelXzOff, bJITLoadStorelwzOff, bJITLoadStorelbzxOff;
bool bJITLoadStoreFloatingOff;
bool bJITLoadStorePairedOff;
bool bJITFloatingPointOff;
bool bJITIntegerOff;
bool bJITPairedOff;
bool bJITSystemRegistersOff;
bool bJITBranchOff;
bool bJITILTimeProfiling;
bool bJITILOutputIR;
bool bFastmem;
bool bFPRF;
bool bAccurateNaNs;
bool bCPUThread;
bool bDSPThread;
bool bDSPHLE;
bool bSkipIdle;
bool bSyncGPUOnSkipIdleHack;
bool bNTSC;
bool bForceNTSCJ;
bool bHLE_BS2;
bool bEnableCheats;
bool bEnableMemcardSaving;
bool bDPL2Decoder;
int iLatency;
bool bRunCompareServer;
bool bRunCompareClient;
bool bMMU;
bool bDCBZOFF;
int iBBDumpPort;
bool bFastDiscSpeed;
bool bSyncGPU;
int iSyncGpuMaxDistance;
int iSyncGpuMinDistance;
float fSyncGpuOverclock;
int SelectedLanguage;
bool bOverrideGCLanguage;
bool bWii;
// Interface settings
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
std::string theme_name;
// Display settings
std::string strFullscreenResolution;
int iRenderWindowXPos, iRenderWindowYPos;
int iRenderWindowWidth, iRenderWindowHeight;
bool bRenderWindowAutoSize, bKeepWindowOnTop;
bool bFullscreen, bRenderToMain;
bool bProgressive, bDisableScreenSaver;
int iPosX, iPosY, iWidth, iHeight;
// Fifo Player related settings
bool bLoopFifoReplay;
enum EBootBS2
{
BOOT_DEFAULT,
BOOT_BS2_JAP,
BOOT_BS2_USA,
BOOT_BS2_EUR,
};
enum EBootType
{
BOOT_ISO,
BOOT_ELF,
BOOT_DOL,
BOOT_WII_NAND,
BOOT_BS2,
BOOT_DFF
};
EBootType m_BootType;
std::string m_strVideoBackend;
std::string m_strGPUDeterminismMode;
// set based on the string version
GPUDeterminismMode m_GPUDeterminismMode;
// files
std::string m_strFilename;
std::string m_strBootROM;
std::string m_strSRAM;
std::string m_strDefaultISO;
std::string m_strDVDRoot;
std::string m_strApploader;
std::string m_strUniqueID;
std::string m_strName;
u16 m_revision;
std::string m_perfDir;
void LoadDefaults();
bool AutoSetup(EBootBS2 _BootBS2);
const std::string &GetUniqueID() const { return m_strUniqueID; }
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
DiscIO::IVolume::ELanguage GetCurrentLanguage(bool wii) const;
IniFile LoadDefaultGameIni() const;
IniFile LoadLocalGameIni() const;
IniFile LoadGameIni() const;
static IniFile LoadDefaultGameIni(const std::string& id, u16 revision);
static IniFile LoadLocalGameIni(const std::string& id, u16 revision);
static IniFile LoadGameIni(const std::string& id, u16 revision);
static std::vector<std::string> GetGameIniFilenames(const std::string& id, u16 revision);
std::string m_NANDPath;
std::string m_strMemoryCardA;

View File

@ -23,7 +23,6 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/CoreTiming.h"
#include "Core/DSPEmulator.h"
#include "Core/Host.h"
@ -190,8 +189,7 @@ bool IsCPUThread()
bool IsGPUThread()
{
const SCoreStartupParameter& _CoreParameter =
SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& _CoreParameter = SConfig::GetInstance();
if (_CoreParameter.bCPUThread)
{
return (s_emu_thread.joinable() && (s_emu_thread.get_id() == std::this_thread::get_id()));
@ -206,8 +204,7 @@ bool IsGPUThread()
// BootManager.cpp
bool Init()
{
const SCoreStartupParameter& _CoreParameter =
SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& _CoreParameter = SConfig::GetInstance();
if (s_emu_thread.joinable())
{
@ -252,8 +249,7 @@ void Stop() // - Hammertime!
if (GetState() == CORE_STOPPING)
return;
const SCoreStartupParameter& _CoreParameter =
SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& _CoreParameter = SConfig::GetInstance();
s_is_stopping = true;
@ -310,8 +306,7 @@ static void CpuThread()
{
DeclareAsCPUThread();
const SCoreStartupParameter& _CoreParameter =
SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& _CoreParameter = SConfig::GetInstance();
if (_CoreParameter.bCPUThread)
{
@ -365,7 +360,7 @@ static void CpuThread()
static void FifoPlayerThread()
{
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& _CoreParameter = SConfig::GetInstance();
if (_CoreParameter.bCPUThread)
{
@ -401,8 +396,7 @@ static void FifoPlayerThread()
// See the BootManager.cpp file description for a complete call schedule.
void EmuThread()
{
const SCoreStartupParameter& core_parameter =
SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& core_parameter = SConfig::GetInstance();
Common::SetCurrentThreadName("Emuthread - Starting");
@ -429,9 +423,9 @@ void EmuThread()
OSD::AddMessage("Dolphin " + g_video_backend->GetName() + " Video Backend.", 5000);
if (cpu_info.HTT)
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread = cpu_info.num_cores > 4;
SConfig::GetInstance().bDSPThread = cpu_info.num_cores > 4;
else
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread = cpu_info.num_cores > 2;
SConfig::GetInstance().bDSPThread = cpu_info.num_cores > 2;
if (!DSP::GetDSPEmulator()->Initialize(core_parameter.bWii, core_parameter.bDSPThread))
{
@ -504,7 +498,7 @@ void EmuThread()
// Determine the CPU thread function
void (*cpuThreadFunc)(void);
if (core_parameter.m_BootType == SCoreStartupParameter::BOOT_DFF)
if (core_parameter.m_BootType == SConfig::BOOT_DFF)
cpuThreadFunc = FifoPlayerThread;
else
cpuThreadFunc = CpuThread;
@ -644,7 +638,7 @@ EState GetState()
static std::string GenerateScreenshotName()
{
const std::string& gameId = SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID();
const std::string& gameId = SConfig::GetInstance().GetUniqueID();
std::string path = File::GetUserPath(D_SCREENSHOTS_IDX) + gameId + DIR_SEP_CHR;
if (!File::CreateFullPath(path))
@ -751,7 +745,7 @@ void UpdateTitle()
{
u32 ElapseTime = (u32)s_timer.GetTimeDifference();
s_request_refresh_info = false;
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& _CoreParameter = SConfig::GetInstance();
if (ElapseTime == 0)
ElapseTime = 1;

View File

@ -46,7 +46,6 @@
<ClCompile Include="Boot\ElfReader.cpp" />
<ClCompile Include="ConfigManager.cpp" />
<ClCompile Include="Core.cpp" />
<ClCompile Include="CoreParameter.cpp" />
<ClCompile Include="CoreTiming.cpp" />
<ClCompile Include="Debugger\Debugger_SymbolMap.cpp" />
<ClCompile Include="Debugger\Dump.cpp" />
@ -264,7 +263,6 @@
<ClInclude Include="Boot\ElfTypes.h" />
<ClInclude Include="ConfigManager.h" />
<ClInclude Include="Core.h" />
<ClInclude Include="CoreParameter.h" />
<ClInclude Include="CoreTiming.h" />
<ClInclude Include="Debugger\Debugger_SymbolMap.h" />
<ClInclude Include="Debugger\Dump.h" />

View File

@ -144,7 +144,6 @@
<ClCompile Include="BootManager.cpp" />
<ClCompile Include="ConfigManager.cpp" />
<ClCompile Include="Core.cpp" />
<ClCompile Include="CoreParameter.cpp" />
<ClCompile Include="CoreTiming.cpp" />
<ClCompile Include="ec_wii.cpp" />
<ClCompile Include="HotkeyManager.cpp" />
@ -738,7 +737,6 @@
<ClInclude Include="BootManager.h" />
<ClInclude Include="ConfigManager.h" />
<ClInclude Include="Core.h" />
<ClInclude Include="CoreParameter.h" />
<ClInclude Include="CoreTiming.h" />
<ClInclude Include="ec_wii.h" />
<ClInclude Include="Host.h" />

View File

@ -1,452 +0,0 @@
// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include <cinttypes>
#include <memory>
#include "Common/CDUtils.h"
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h" // for bWii
#include "Core/CoreParameter.h"
#include "Core/Boot/Boot.h"
#include "Core/Boot/Boot_DOL.h"
#include "Core/FifoPlayer/FifoDataFile.h"
#include "Core/PowerPC/PowerPC.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/VolumeCreator.h"
SCoreStartupParameter::SCoreStartupParameter()
: bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false),
bJITNoBlockCache(false), bJITNoBlockLinking(false),
bJITOff(false),
bJITLoadStoreOff(false), bJITLoadStorelXzOff(false),
bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),
bJITLoadStoreFloatingOff(false), bJITLoadStorePairedOff(false),
bJITFloatingPointOff(false), bJITIntegerOff(false),
bJITPairedOff(false), bJITSystemRegistersOff(false),
bJITBranchOff(false),
bJITILTimeProfiling(false), bJITILOutputIR(false),
bFPRF(false), bAccurateNaNs(false),
bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bSyncGPUOnSkipIdleHack(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bEnableCheats(false),
bEnableMemcardSaving(true),
bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), bDCBZOFF(false),
iBBDumpPort(0),
bFastDiscSpeed(false), bSyncGPU(false),
SelectedLanguage(0), bOverrideGCLanguage(false), bWii(false),
bConfirmStop(false), bHideCursor(false),
bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
iRenderWindowWidth(640), iRenderWindowHeight(480),
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
bFullscreen(false), bRenderToMain(false),
bProgressive(false), bDisableScreenSaver(false),
iPosX(100), iPosY(100), iWidth(800), iHeight(600),
bLoopFifoReplay(true)
{
LoadDefaults();
}
void SCoreStartupParameter::LoadDefaults()
{
bEnableDebugging = false;
bAutomaticStart = false;
bBootToPause = false;
#ifdef USE_GDBSTUB
iGDBPort = -1;
#ifndef _WIN32
gdb_socket = "";
#endif
#endif
iCPUCore = PowerPC::CORE_JIT64;
bCPUThread = false;
bSkipIdle = false;
bSyncGPUOnSkipIdleHack = true;
bRunCompareServer = false;
bDSPHLE = true;
bFastmem = true;
bFPRF = false;
bAccurateNaNs = false;
bMMU = false;
bDCBZOFF = false;
iBBDumpPort = -1;
bSyncGPU = false;
bFastDiscSpeed = false;
bEnableMemcardSaving = true;
SelectedLanguage = 0;
bOverrideGCLanguage = false;
bWii = false;
bDPL2Decoder = false;
iLatency = 14;
iPosX = 100;
iPosY = 100;
iWidth = 800;
iHeight = 600;
bLoopFifoReplay = true;
bJITOff = false; // debugger only settings
bJITLoadStoreOff = false;
bJITLoadStoreFloatingOff = false;
bJITLoadStorePairedOff = false;
bJITFloatingPointOff = false;
bJITIntegerOff = false;
bJITPairedOff = false;
bJITSystemRegistersOff = false;
m_strName = "NONE";
m_strUniqueID = "00000000";
}
static const char* GetRegionOfCountry(DiscIO::IVolume::ECountry country)
{
switch (country)
{
case DiscIO::IVolume::COUNTRY_USA:
return USA_DIR;
case DiscIO::IVolume::COUNTRY_TAIWAN:
case DiscIO::IVolume::COUNTRY_KOREA:
// TODO: Should these have their own Region Dir?
case DiscIO::IVolume::COUNTRY_JAPAN:
return JAP_DIR;
case DiscIO::IVolume::COUNTRY_AUSTRALIA:
case DiscIO::IVolume::COUNTRY_EUROPE:
case DiscIO::IVolume::COUNTRY_FRANCE:
case DiscIO::IVolume::COUNTRY_GERMANY:
case DiscIO::IVolume::COUNTRY_ITALY:
case DiscIO::IVolume::COUNTRY_NETHERLANDS:
case DiscIO::IVolume::COUNTRY_RUSSIA:
case DiscIO::IVolume::COUNTRY_SPAIN:
case DiscIO::IVolume::COUNTRY_WORLD:
return EUR_DIR;
case DiscIO::IVolume::COUNTRY_UNKNOWN:
default:
return nullptr;
}
}
bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2)
{
std::string set_region_dir(EUR_DIR);
switch (_BootBS2)
{
case BOOT_DEFAULT:
{
bool bootDrive = cdio_is_cdrom(m_strFilename);
// Check if the file exist, we may have gotten it from a --elf command line
// that gave an incorrect file name
if (!bootDrive && !File::Exists(m_strFilename))
{
PanicAlertT("The specified file \"%s\" does not exist", m_strFilename.c_str());
return false;
}
std::string Extension;
SplitPath(m_strFilename, nullptr, nullptr, &Extension);
if (!strcasecmp(Extension.c_str(), ".gcm") ||
!strcasecmp(Extension.c_str(), ".iso") ||
!strcasecmp(Extension.c_str(), ".wbfs") ||
!strcasecmp(Extension.c_str(), ".ciso") ||
!strcasecmp(Extension.c_str(), ".gcz") ||
bootDrive)
{
m_BootType = BOOT_ISO;
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
if (pVolume == nullptr)
{
if (bootDrive)
PanicAlertT("Could not read \"%s\". "
"There is no disc in the drive, or it is not a GC/Wii backup. "
"Please note that original GameCube and Wii discs cannot be read "
"by most PC DVD drives.", m_strFilename.c_str());
else
PanicAlertT("\"%s\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.",
m_strFilename.c_str());
return false;
}
m_strName = pVolume->GetInternalName();
m_strUniqueID = pVolume->GetUniqueID();
m_revision = pVolume->GetRevision();
// Check if we have a Wii disc
bWii = pVolume.get()->GetVolumeType() == DiscIO::IVolume::WII_DISC;
const char* retrieved_region_dir = GetRegionOfCountry(pVolume->GetCountry());
if (!retrieved_region_dir)
{
if (!PanicYesNoT("Your GCM/ISO file seems to be invalid (invalid country)."
"\nContinue with PAL region?"))
return false;
retrieved_region_dir = EUR_DIR;
}
set_region_dir = retrieved_region_dir;
bNTSC = set_region_dir == USA_DIR || set_region_dir == JAP_DIR;
}
else if (!strcasecmp(Extension.c_str(), ".elf"))
{
bWii = CBoot::IsElfWii(m_strFilename);
set_region_dir = USA_DIR;
m_BootType = BOOT_ELF;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dol"))
{
CDolLoader dolfile(m_strFilename);
bWii = dolfile.IsWii();
set_region_dir = USA_DIR;
m_BootType = BOOT_DOL;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dff"))
{
bWii = true;
set_region_dir = USA_DIR;
bNTSC = true;
m_BootType = BOOT_DFF;
std::unique_ptr<FifoDataFile> ddfFile(FifoDataFile::Load(m_strFilename, true));
if (ddfFile)
{
bWii = ddfFile->GetIsWii();
}
}
else if (DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename).IsValid())
{
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
const DiscIO::INANDContentLoader& ContentLoader = DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename);
if (ContentLoader.GetContentByIndex(ContentLoader.GetBootIndex()) == nullptr)
{
//WAD is valid yet cannot be booted. Install instead.
u64 installed = DiscIO::CNANDContentManager::Access().Install_WiiWAD(m_strFilename);
if (installed)
SuccessAlertT("The WAD has been installed successfully");
return false; //do not boot
}
const char* retrieved_region_dir = GetRegionOfCountry(ContentLoader.GetCountry());
set_region_dir = retrieved_region_dir ? retrieved_region_dir : EUR_DIR;
bNTSC = set_region_dir == USA_DIR || set_region_dir == JAP_DIR;
bWii = true;
m_BootType = BOOT_WII_NAND;
if (pVolume)
{
m_strName = pVolume->GetInternalName();
m_strUniqueID = pVolume->GetUniqueID();
}
else
{
// null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
// if this is the second boot we would be using the Name and id of the last title
m_strName.clear();
m_strUniqueID.clear();
}
// Use the TitleIDhex for name and/or unique ID if launching from nand folder
// or if it is not ascii characters (specifically sysmenu could potentially apply to other things)
std::string titleidstr = StringFromFormat("%016" PRIx64, ContentLoader.GetTitleID());
if (m_strName.empty())
{
m_strName = titleidstr;
}
if (m_strUniqueID.empty())
{
m_strUniqueID = titleidstr;
}
}
else
{
PanicAlertT("Could not recognize ISO file %s", m_strFilename.c_str());
return false;
}
}
break;
case BOOT_BS2_USA:
set_region_dir = USA_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BS2_JAP:
set_region_dir = JAP_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BS2_EUR:
set_region_dir = EUR_DIR;
m_strFilename.clear();
bNTSC = false;
break;
}
// Setup paths
CheckMemcardPath(SConfig::GetInstance().m_strMemoryCardA, set_region_dir, true);
CheckMemcardPath(SConfig::GetInstance().m_strMemoryCardB, set_region_dir, false);
m_strSRAM = File::GetUserPath(F_GCSRAM_IDX);
if (!bWii)
{
if (!bHLE_BS2)
{
m_strBootROM = File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
if (!File::Exists(m_strBootROM))
m_strBootROM = File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
if (!File::Exists(m_strBootROM))
{
WARN_LOG(BOOT, "Bootrom file %s not found - using HLE.", m_strBootROM.c_str());
bHLE_BS2 = true;
}
}
}
else if (bWii && !bHLE_BS2)
{
WARN_LOG(BOOT, "GC bootrom file will not be loaded for Wii mode.");
bHLE_BS2 = true;
}
return true;
}
void SCoreStartupParameter::CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA)
{
std::string ext("." + gameRegion + ".raw");
if (memcardPath.empty())
{
// Use default memcard path if there is no user defined name
std::string defaultFilename = isSlotA ? GC_MEMCARDA : GC_MEMCARDB;
memcardPath = File::GetUserPath(D_GCUSER_IDX) + defaultFilename + ext;
}
else
{
std::string filename = memcardPath;
std::string region = filename.substr(filename.size()-7, 3);
bool hasregion = false;
hasregion |= region.compare(USA_DIR) == 0;
hasregion |= region.compare(JAP_DIR) == 0;
hasregion |= region.compare(EUR_DIR) == 0;
if (!hasregion)
{
// filename doesn't have region in the extension
if (File::Exists(filename))
{
// If the old file exists we are polite and ask if we should copy it
std::string oldFilename = filename;
filename.replace(filename.size()-4, 4, ext);
if (PanicYesNoT("Memory Card filename in Slot %c is incorrect\n"
"Region not specified\n\n"
"Slot %c path was changed to\n"
"%s\n"
"Would you like to copy the old file to this new location?\n",
isSlotA ? 'A':'B', isSlotA ? 'A':'B', filename.c_str()))
{
if (!File::Copy(oldFilename, filename))
PanicAlertT("Copy failed");
}
}
memcardPath = filename; // Always correct the path!
}
else if (region.compare(gameRegion) != 0)
{
// filename has region, but it's not == gameRegion
// Just set the correct filename, the EXI Device will create it if it doesn't exist
memcardPath = filename.replace(filename.size()-ext.size(), ext.size(), ext);
}
}
}
DiscIO::IVolume::ELanguage SCoreStartupParameter::GetCurrentLanguage(bool wii) const
{
DiscIO::IVolume::ELanguage language;
if (wii)
language = (DiscIO::IVolume::ELanguage)SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
else
language = (DiscIO::IVolume::ELanguage)(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage + 1);
// Get rid of invalid values (probably doesn't matter, but might as well do it)
if (language > DiscIO::IVolume::ELanguage::LANGUAGE_UNKNOWN || language < 0)
language = DiscIO::IVolume::ELanguage::LANGUAGE_UNKNOWN;
return language;
}
IniFile SCoreStartupParameter::LoadDefaultGameIni() const
{
return LoadDefaultGameIni(GetUniqueID(), m_revision);
}
IniFile SCoreStartupParameter::LoadLocalGameIni() const
{
return LoadLocalGameIni(GetUniqueID(), m_revision);
}
IniFile SCoreStartupParameter::LoadGameIni() const
{
return LoadGameIni(GetUniqueID(), m_revision);
}
IniFile SCoreStartupParameter::LoadDefaultGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename, true);
return game_ini;
}
IniFile SCoreStartupParameter::LoadLocalGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
return game_ini;
}
IniFile SCoreStartupParameter::LoadGameIni(const std::string& id, u16 revision)
{
IniFile game_ini;
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename, true);
for (const std::string& filename : GetGameIniFilenames(id, revision))
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
return game_ini;
}
// Returns all possible filenames in ascending order of priority
std::vector<std::string> SCoreStartupParameter::GetGameIniFilenames(const std::string& id, u16 revision)
{
std::vector<std::string> filenames;
// INIs that match all regions
if (id.size() >= 4)
filenames.push_back(id.substr(0, 3) + ".ini");
// Regular INIs
filenames.push_back(id + ".ini");
// INIs with specific revisions
filenames.push_back(id + StringFromFormat("r%d", revision) + ".ini");
return filenames;
}

View File

@ -1,159 +0,0 @@
// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <string>
#include "Common/IniFile.h"
#include "DiscIO/Volume.h"
enum GPUDeterminismMode
{
GPU_DETERMINISM_AUTO,
GPU_DETERMINISM_NONE,
// This is currently the only mode. There will probably be at least
// one more at some point.
GPU_DETERMINISM_FAKE_COMPLETION,
};
struct SCoreStartupParameter
{
// Settings
bool bEnableDebugging;
#ifdef USE_GDBSTUB
int iGDBPort;
#ifndef _WIN32
std::string gdb_socket;
#endif
#endif
bool bAutomaticStart;
bool bBootToPause;
int iCPUCore;
// JIT (shared between JIT and JITIL)
bool bJITNoBlockCache, bJITNoBlockLinking;
bool bJITOff;
bool bJITLoadStoreOff, bJITLoadStorelXzOff, bJITLoadStorelwzOff, bJITLoadStorelbzxOff;
bool bJITLoadStoreFloatingOff;
bool bJITLoadStorePairedOff;
bool bJITFloatingPointOff;
bool bJITIntegerOff;
bool bJITPairedOff;
bool bJITSystemRegistersOff;
bool bJITBranchOff;
bool bJITILTimeProfiling;
bool bJITILOutputIR;
bool bFastmem;
bool bFPRF;
bool bAccurateNaNs;
bool bCPUThread;
bool bDSPThread;
bool bDSPHLE;
bool bSkipIdle;
bool bSyncGPUOnSkipIdleHack;
bool bNTSC;
bool bForceNTSCJ;
bool bHLE_BS2;
bool bEnableCheats;
bool bEnableMemcardSaving;
bool bDPL2Decoder;
int iLatency;
bool bRunCompareServer;
bool bRunCompareClient;
bool bMMU;
bool bDCBZOFF;
int iBBDumpPort;
bool bFastDiscSpeed;
bool bSyncGPU;
int iSyncGpuMaxDistance;
int iSyncGpuMinDistance;
float fSyncGpuOverclock;
int SelectedLanguage;
bool bOverrideGCLanguage;
bool bWii;
// Interface settings
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
std::string theme_name;
// Display settings
std::string strFullscreenResolution;
int iRenderWindowXPos, iRenderWindowYPos;
int iRenderWindowWidth, iRenderWindowHeight;
bool bRenderWindowAutoSize, bKeepWindowOnTop;
bool bFullscreen, bRenderToMain;
bool bProgressive, bDisableScreenSaver;
int iPosX, iPosY, iWidth, iHeight;
// Fifo Player related settings
bool bLoopFifoReplay;
enum EBootBS2
{
BOOT_DEFAULT,
BOOT_BS2_JAP,
BOOT_BS2_USA,
BOOT_BS2_EUR,
};
enum EBootType
{
BOOT_ISO,
BOOT_ELF,
BOOT_DOL,
BOOT_WII_NAND,
BOOT_BS2,
BOOT_DFF
};
EBootType m_BootType;
std::string m_strVideoBackend;
std::string m_strGPUDeterminismMode;
// set based on the string version
GPUDeterminismMode m_GPUDeterminismMode;
// files
std::string m_strFilename;
std::string m_strBootROM;
std::string m_strSRAM;
std::string m_strDefaultISO;
std::string m_strDVDRoot;
std::string m_strApploader;
std::string m_strUniqueID;
std::string m_strName;
u16 m_revision;
std::string m_perfDir;
// Constructor just calls LoadDefaults
SCoreStartupParameter();
void LoadDefaults();
bool AutoSetup(EBootBS2 _BootBS2);
const std::string &GetUniqueID() const { return m_strUniqueID; }
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
DiscIO::IVolume::ELanguage GetCurrentLanguage(bool wii) const;
IniFile LoadDefaultGameIni() const;
IniFile LoadLocalGameIni() const;
IniFile LoadGameIni() const;
static IniFile LoadDefaultGameIni(const std::string& id, u16 revision);
static IniFile LoadLocalGameIni(const std::string& id, u16 revision);
static IniFile LoadGameIni(const std::string& id, u16 revision);
static std::vector<std::string> GetGameIniFilenames(const std::string& id, u16 revision);
};

View File

@ -482,7 +482,7 @@ void Idle()
{
//DEBUG_LOG(POWERPC, "Idle");
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack)
if (SConfig::GetInstance().bSyncGPUOnSkipIdleHack)
{
//When the FIFO is processing data we must not advance because in this way
//the VI will be desynchronized. So, We are waiting until the FIFO finish and

View File

@ -74,7 +74,7 @@ void GetTlutLoadData(u32 &tlutAddr, u32 &memAddr, u32 &tlutXferCount, BPMemory &
tlutXferCount = (bpMem.tmem_config.tlut_dest & 0x1FFC00) >> 5;
// TODO - figure out a cleaner way.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
memAddr = bpMem.tmem_config.tlut_src << 5;
else
memAddr = (bpMem.tmem_config.tlut_src & 0xFFFFF) << 5;

View File

@ -163,7 +163,7 @@ FifoPlayer::FifoPlayer() :
m_FrameWrittenCb(nullptr),
m_File(nullptr)
{
m_Loop = SConfig::GetInstance().m_LocalCoreStartupParameter.bLoopFifoReplay;
m_Loop = SConfig::GetInstance().bLoopFifoReplay;
}
void FifoPlayer::WriteFrame(const FifoFrameInfo &frame, const AnalyzedFrameInfo &info)

View File

@ -44,7 +44,7 @@ void FifoRecorder::StartRecording(s32 numFrames, CallbackFunc finishedCb)
std::fill(m_Ram.begin(), m_Ram.end(), 0);
std::fill(m_ExRam.begin(), m_ExRam.end(), 0);
m_File->SetIsWii(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii);
m_File->SetIsWii(SConfig::GetInstance().bWii);
if (!m_IsRecording)
{

View File

@ -86,7 +86,7 @@ static bool InstallCodeHandler()
u8 mmioAddr = 0xCC;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
mmioAddr = 0xCD;
}
@ -157,7 +157,7 @@ static bool InstallCodeHandler()
void RunCodeHandler()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats && active_codes.size() > 0)
if (SConfig::GetInstance().bEnableCheats && active_codes.size() > 0)
{
if (!code_handler_installed || PowerPC::HostRead_U32(INSTALLER_BASE_ADDRESS) - 0xd01f1bad > 5)
code_handler_installed = InstallCodeHandler();

View File

@ -94,7 +94,7 @@ void PatchFunctions()
}
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
for (size_t i = 1; i < sizeof(OSBreakPoints) / sizeof(SPatch); i++)
{
@ -143,7 +143,7 @@ int GetFunctionFlagsByIndex(u32 index)
bool IsEnabled(int flags)
{
if (flags == HLE::HLE_TYPE_DEBUG && !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && PowerPC::GetMode() != MODE_INTERPRETER)
if (flags == HLE::HLE_TYPE_DEBUG && !SConfig::GetInstance().bEnableDebugging && PowerPC::GetMode() != MODE_INTERPRETER)
return false;
return true;

View File

@ -226,7 +226,7 @@ void Init(bool hle)
dsp_emulator = CreateDSPEmulator(hle);
dsp_is_lle = dsp_emulator->IsLLE();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
g_ARAM.wii_mode = true;
g_ARAM.size = Memory::EXRAM_SIZE;

View File

@ -34,7 +34,7 @@ void CARDUCode::Update()
u32 CARDUCode::GetUpdateMs()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 3 : 5;
return SConfig::GetInstance().bWii ? 3 : 5;
}
void CARDUCode::HandleMail(u32 mail)

View File

@ -29,7 +29,7 @@ void GBAUCode::Update()
u32 GBAUCode::GetUpdateMs()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 3 : 5;
return SConfig::GetInstance().bWii ? 3 : 5;
}
void GBAUCode::HandleMail(u32 mail)

View File

@ -31,7 +31,7 @@ void INITUCode::Update()
u32 INITUCode::GetUpdateMs()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 3 : 5;
return SConfig::GetInstance().bWii ? 3 : 5;
}
void INITUCode::HandleMail(u32 mail)

View File

@ -117,7 +117,7 @@ void ROMUCode::BootUCode()
u32 ROMUCode::GetUpdateMs()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 3 : 5;
return SConfig::GetInstance().bWii ? 3 : 5;
}
void ROMUCode::DoState(PointerWrap &p)

View File

@ -516,7 +516,7 @@ void ZeldaUCode::ExecuteList()
u32 ZeldaUCode::GetUpdateMs()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 3 : 5;
return SConfig::GetInstance().bWii ? 3 : 5;
}
void ZeldaUCode::DoState(PointerWrap &p)

View File

@ -41,14 +41,12 @@ void OSD_AddMessage(const std::string& str, u32 ms)
bool OnThread()
{
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
return _CoreParameter.bDSPThread;
return SConfig::GetInstance().bDSPThread;
}
bool IsWiiHost()
{
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
return _CoreParameter.bWii;
return SConfig::GetInstance().bWii;
}
void InterruptRequest()

View File

@ -324,7 +324,7 @@ void DSPLLE::DSP_Update(int cycles)
DSP_StopSoundStream();
m_bDSPThread = false;
requestDisableThread = false;
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread = false;
SConfig::GetInstance().bDSPThread = false;
}
}

View File

@ -506,7 +506,7 @@ void EjectDiscCallback(u64 userdata, int cyclesLate)
void InsertDiscCallback(u64 userdata, int cyclesLate)
{
std::string& SavedFileName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename;
std::string& SavedFileName = SConfig::GetInstance().m_strFilename;
std::string *_FileName = (std::string *)userdata;
if (!SetVolumeName(*_FileName))
@ -703,7 +703,7 @@ DVDReadCommand ExecuteReadCommand(u64 DVD_offset, u32 output_address, u32 DVD_le
DVD_length = output_length;
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed)
if (SConfig::GetInstance().bFastDiscSpeed)
// An optional hack to speed up loading times
*ticks_until_completion = output_length * (SystemTimers::GetTicksPerSecond() / BUFFER_TRANSFER_RATE);
else

View File

@ -88,12 +88,12 @@ CEXIIPL::CEXIIPL() :
m_FontsLoaded(false)
{
// Determine region
m_bNTSC = SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC;
m_bNTSC = SConfig::GetInstance().bNTSC;
// Create the IPL
m_pIPL = (u8*)AllocateMemoryPages(ROM_SIZE);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2)
if (SConfig::GetInstance().bHLE_BS2)
{
// Copy header
memcpy(m_pIPL, m_bNTSC ? iplverNTSC : iplverPAL, m_bNTSC ? sizeof(iplverNTSC) : sizeof(iplverPAL));
@ -105,7 +105,7 @@ CEXIIPL::CEXIIPL() :
else
{
// Load whole ROM dump
LoadFileToIPL(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strBootROM, 0);
LoadFileToIPL(SConfig::GetInstance().m_strBootROM, 0);
// Descramble the encrypted section (contains BS1 and BS2)
Descrambler(m_pIPL + 0x100, 0x1aff00);
INFO_LOG(BOOT, "Loaded bootrom: %s", m_pIPL); // yay for null-terminated strings ;p
@ -115,7 +115,7 @@ CEXIIPL::CEXIIPL() :
memset(m_RTC, 0, sizeof(m_RTC));
// We Overwrite language selection here since it's possible on the GC to change the language as you please
g_SRAM.lang = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
g_SRAM.lang = SConfig::GetInstance().SelectedLanguage;
FixSRAMChecksums();
WriteProtectMemory(m_pIPL, ROM_SIZE);
@ -128,7 +128,7 @@ CEXIIPL::~CEXIIPL()
m_pIPL = nullptr;
// SRAM
File::IOFile file(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strSRAM, "wb");
File::IOFile file(SConfig::GetInstance().m_strSRAM, "wb");
file.WriteArray(&g_SRAM, 1);
}
void CEXIIPL::DoState(PointerWrap &p)
@ -187,7 +187,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
{
// Get the time ...
u32 &rtc = *((u32 *)&m_RTC);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
// Subtract Wii bias
rtc = Common::swap32(CEXIIPL::GetGCTime() - cWiiBias);

View File

@ -117,7 +117,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gciFolder)
// Disney Sports : Soccer GDKEA4
// Use a 16Mb (251 block) memory card for these games
bool useMC251;
IniFile gameIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
IniFile gameIni = SConfig::GetInstance().LoadGameIni();
gameIni.GetOrCreateSection("Core")->Get("MemoryCard251", &useMC251, false);
u16 sizeMb = useMC251 ? MemCard251Mb : MemCard2043Mb;
@ -139,7 +139,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gciFolder)
void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
{
DiscIO::IVolume::ECountry country_code = DiscIO::IVolume::COUNTRY_UNKNOWN;
auto strUniqueID = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID;
auto strUniqueID = SConfig::GetInstance().m_strUniqueID;
u32 CurrentGameId = 0;
if (strUniqueID == TITLEID_SYSMENU_STRING)
@ -169,7 +169,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
case DiscIO::IVolume::COUNTRY_UNKNOWN:
{
// The current game's region is not passed down to the EXI device level.
// Usually, we can retrieve the region from SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueId.
// Usually, we can retrieve the region from SConfig::GetInstance().m_strUniqueId.
// The Wii System Menu requires a lookup based on the version number.
// This is not possible in some cases ( e.g. FIFO logs, homebrew elf/dol files).
// Instead, we then lookup the region from the memory card name
@ -177,7 +177,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
// For now take advantage of this.
// Future options:
// Set memory card directory path in the checkMemcardPath function.
// or Add region to SConfig::GetInstance().m_LocalCoreStartupParameter.
// or Add region to SConfig::GetInstance().
// or Pass region down to the EXI device creation.
std::string memcardFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;

View File

@ -187,7 +187,7 @@ GCMemcardDirectory::GCMemcardDirectory(const std::string& directory, int slot, u
void GCMemcardDirectory::FlushThread()
{
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableMemcardSaving)
if (!SConfig::GetInstance().bEnableMemcardSaving)
{
return;
}

View File

@ -63,7 +63,7 @@ MemoryCard::~MemoryCard()
void MemoryCard::FlushThread()
{
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableMemcardSaving)
if (!SConfig::GetInstance().bEnableMemcardSaving)
{
return;
}

View File

@ -44,13 +44,13 @@ namespace HW
ProcessorInterface::Init();
ExpansionInterface::Init(); // Needs to be initialized before Memory
Memory::Init();
DSP::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE);
DSP::Init(SConfig::GetInstance().bDSPHLE);
DVDInterface::Init();
GPFifo::Init();
CCPU::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore);
CCPU::Init(SConfig::GetInstance().iCPUCore);
SystemTimers::Init();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
Common::InitializeWiiRoot(Core::g_want_determinism);
DiscIO::cUIDsys::AccessInstance().UpdateLocation();
@ -71,7 +71,7 @@ namespace HW
SerialInterface::Shutdown();
AudioInterface::Shutdown();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
WII_IPCInterface::Shutdown();
WII_IPC_HLE_Interface::Shutdown();
@ -103,7 +103,7 @@ namespace HW
AudioInterface::DoState(p);
p.DoMarker("AudioInterface");
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
WII_IPCInterface::DoState(p);
p.DoMarker("WII_IPCInterface");

View File

@ -46,7 +46,7 @@ inline bool IsMMIOAddress(u32 address)
if ((address & 0xFFFF0000) == 0x0C000000)
return true; // GameCube MMIOs
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if(SConfig::GetInstance().bWii)
{
return ((address & 0xFFFF0000) == 0x0D000000) || // Wii MMIOs
((address & 0xFFFF0000) == 0x0D800000); // Mirror of Wii MMIOs

View File

@ -167,8 +167,8 @@ static const int num_views = sizeof(views) / sizeof(MemoryView);
void Init()
{
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
bool bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
bool wii = SConfig::GetInstance().bWii;
bool bMMU = SConfig::GetInstance().bMMU;
#ifndef _ARCH_32
// If MMU is turned off in GameCube mode, turn on fake VMEM hack.
// The fake VMEM hack's address space is above the memory space that we
@ -197,7 +197,7 @@ void Init()
void DoState(PointerWrap &p)
{
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
bool wii = SConfig::GetInstance().bWii;
p.DoArray(m_pRAM, RAM_SIZE);
p.DoArray(m_pL1Cache, L1_CACHE_SIZE);
p.DoMarker("Memory RAM");
@ -213,7 +213,7 @@ void Shutdown()
{
m_IsInitialized = false;
u32 flags = 0;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) flags |= MV_WII_ONLY;
if (SConfig::GetInstance().bWii) flags |= MV_WII_ONLY;
if (bFakeVMEM) flags |= MV_FAKE_VMEM;
MemoryMap_Shutdown(views, num_views, flags, &g_arena);
g_arena.ReleaseSHMSegment();
@ -229,7 +229,7 @@ void Clear()
memset(m_pRAM, 0, RAM_SIZE);
if (m_pL1Cache)
memset(m_pL1Cache, 0, L1_CACHE_SIZE);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && m_pEXRAM)
if (SConfig::GetInstance().bWii && m_pEXRAM)
memset(m_pEXRAM, 0, EXRAM_SIZE);
}
@ -303,7 +303,7 @@ u8* GetPointer(u32 address)
if (address < REALRAM_SIZE)
return m_pRAM + address;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
if ((address >> 28) == 0x1 && (address & 0x0fffffff) < EXRAM_SIZE)
return m_pEXRAM + (address & EXRAM_MASK);

View File

@ -60,7 +60,7 @@ SRAM sram_dump_german = {{
void InitSRAM()
{
File::IOFile file(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strSRAM, "rb");
File::IOFile file(SConfig::GetInstance().m_strSRAM, "rb");
if (file)
{
if (!file.ReadArray(&g_SRAM, 1))

View File

@ -116,7 +116,7 @@ static void AudioDMACallback(u64 userdata, int cyclesLate)
static void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
WII_IPC_HLE_Interface::UpdateDevices();
CoreTiming::ScheduleEvent(IPC_HLE_PERIOD - cyclesLate, et_IPC_HLE);
@ -218,7 +218,7 @@ static void ThrottleCallback(u64 last_time, int cyclesLate)
// split from Init to break a circular dependency between VideoInterface::Init and SystemTimers::Init
void PreInit()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
CPU_CORE_CLOCK = 729000000u;
else
CPU_CORE_CLOCK = 486000000u;
@ -226,7 +226,7 @@ void PreInit()
void Init()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
// AyuanX: TO BE TWEAKED
// Now the 1500 is a pure assumption
@ -251,7 +251,7 @@ void Init()
et_Dec = CoreTiming::RegisterEvent("DecCallback", DecrementerCallback);
et_VI = CoreTiming::RegisterEvent("VICallback", VICallback);
et_SI = CoreTiming::RegisterEvent("SICallback", SICallback);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread && SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU)
if (SConfig::GetInstance().bCPUThread && SConfig::GetInstance().bSyncGPU)
et_CP = CoreTiming::RegisterEvent("CPCallback", CPCallback);
et_DSP = CoreTiming::RegisterEvent("DSPCallback", DSPCallback);
et_AudioDMA = CoreTiming::RegisterEvent("AudioDMACallback", AudioDMACallback);
@ -264,13 +264,13 @@ void Init()
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerFrame(), et_SI);
CoreTiming::ScheduleEvent(AUDIO_DMA_PERIOD, et_AudioDMA);
CoreTiming::ScheduleEvent(0, et_Throttle, Common::Timer::GetTimeMs());
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread && SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU)
if (SConfig::GetInstance().bCPUThread && SConfig::GetInstance().bSyncGPU)
CoreTiming::ScheduleEvent(0, et_CP);
s_last_sync_gpu_tick = CoreTiming::GetTicks();
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerFrame(), et_PatchEngine);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
CoreTiming::ScheduleEvent(IPC_HLE_PERIOD, et_IPC_HLE);
}

View File

@ -137,10 +137,10 @@ void Preset(bool _bNTSC)
m_VBeamPos = 0; // RG4JC0 checks for a zero VBeamPos
// 54MHz, capable of progressive scan
m_Clock = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
m_Clock = SConfig::GetInstance().bProgressive;
// Say component cable is plugged
m_DTVStatus.component_plugged = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
m_DTVStatus.component_plugged = SConfig::GetInstance().bProgressive;
UpdateParameters();
}
@ -172,7 +172,7 @@ void Init()
fields = 1;
m_DTVStatus.ntsc_j = SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ;
m_DTVStatus.ntsc_j = SConfig::GetInstance().bForceNTSCJ;
for (UVIInterruptRegister& reg : m_InterruptRegister)
{
@ -400,7 +400,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
void SetRegionReg(char region)
{
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ)
if (!SConfig::GetInstance().bForceNTSCJ)
m_DTVStatus.ntsc_j = region == 'J';
}

View File

@ -195,14 +195,14 @@ bool Wiimote::Read()
if (result > 0 && m_channel > 0)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort > 0 &&
if (SConfig::GetInstance().iBBDumpPort > 0 &&
m_index == WIIMOTE_BALANCE_BOARD)
{
static sf::UdpSocket Socket;
Socket.send((char*)rpt.data(),
rpt.size(),
sf::IpAddress::LocalHost,
SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort);
SConfig::GetInstance().iBBDumpPort);
}
// Add it to queue
@ -229,10 +229,10 @@ bool Wiimote::Write()
if (!is_speaker_data || m_last_audio_report.GetTimeDifference() > 5)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort > 0 && m_index == WIIMOTE_BALANCE_BOARD)
if (SConfig::GetInstance().iBBDumpPort > 0 && m_index == WIIMOTE_BALANCE_BOARD)
{
static sf::UdpSocket Socket;
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort);
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, SConfig::GetInstance().iBBDumpPort);
}
IOWrite(rpt.data(), rpt.size());

View File

@ -176,15 +176,15 @@ void Init()
s_bFrameStep = false;
s_bFrameStop = false;
s_bSaveConfig = false;
s_iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
s_iCPUCore = SConfig::GetInstance().iCPUCore;
if (IsPlayingInput())
{
ReadHeader();
std::thread md5thread(CheckMD5);
md5thread.detach();
if (strncmp((char *)tmpHeader.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), 6))
if (strncmp((char *)tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6))
{
PanicAlertT("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str());
PanicAlertT("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str());
EndPlayInput(false);
}
}
@ -481,7 +481,7 @@ bool BeginRecordingInput(int controllers)
// This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.
// TODO: find a way to GetTitleDataPath() from Movie::Init()
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
if (File::Exists(Common::GetTitleDataPath(g_titleID) + "banner.bin"))
Movie::g_bClearSave = false;
@ -907,7 +907,7 @@ void LoadInput(const std::string& filename)
}
ChangePads(true);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
ChangeWiiPads(true);
u64 totalSavedBytes = t_record.GetSize() - 256;
@ -1196,9 +1196,9 @@ void SaveRecording(const std::string& filename)
memset(&header, 0, sizeof(DTMHeader));
header.filetype[0] = 'D'; header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A;
strncpy((char *)header.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), 6);
header.bWii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
header.numControllers = s_numPads & (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 0xFF : 0x0F);
strncpy((char *)header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6);
header.bWii = SConfig::GetInstance().bWii;
header.numControllers = s_numPads & (SConfig::GetInstance().bWii ? 0xFF : 0x0F);
header.bFromSaveState = s_bRecordingFromSaveState;
header.frameCount = g_totalFrames;
@ -1287,16 +1287,16 @@ void SetGraphicsConfig()
void GetSettings()
{
s_bSaveConfig = true;
s_bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
s_bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
s_bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
s_bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
s_bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
s_bSkipIdle = SConfig::GetInstance().bSkipIdle;
s_bDualCore = SConfig::GetInstance().bCPUThread;
s_bProgressive = SConfig::GetInstance().bProgressive;
s_bDSPHLE = SConfig::GetInstance().bDSPHLE;
s_bFastDiscSpeed = SConfig::GetInstance().bFastDiscSpeed;
s_videoBackend = g_video_backend->GetName();
s_bSyncGPU = SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU;
s_iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
s_bSyncGPU = SConfig::GetInstance().bSyncGPU;
s_iCPUCore = SConfig::GetInstance().iCPUCore;
s_bNetPlay = NetPlay::IsNetPlayRunning();
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (!SConfig::GetInstance().bWii)
g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
s_memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
s_memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
@ -1353,7 +1353,7 @@ void CheckMD5()
Core::DisplayMessage("Verifying checksum...", 2000);
unsigned char gameMD5[16];
md5_file(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.c_str(), gameMD5);
md5_file(SConfig::GetInstance().m_strFilename.c_str(), gameMD5);
if (memcmp(gameMD5,s_MD5,16) == 0)
Core::DisplayMessage("Checksum of current game matches the recorded game.", 2000);
@ -1365,7 +1365,7 @@ void GetMD5()
{
Core::DisplayMessage("Calculating checksum of game file...", 2000);
memset(s_MD5, 0, sizeof(s_MD5));
md5_file(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.c_str(), s_MD5);
md5_file(SConfig::GetInstance().m_strFilename.c_str(), s_MD5);
Core::DisplayMessage("Finished calculating checksum.", 2000);
}

View File

@ -693,7 +693,7 @@ bool NetPlayClient::StartGame(const std::string &path)
UpdateDevices();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
for (unsigned int i = 0; i < 4; ++i)
WiimoteReal::ChangeWiimoteSource(i, m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE);

View File

@ -161,9 +161,9 @@ int GetSpeedhackCycles(const u32 addr)
void LoadPatches()
{
IniFile merged = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
IniFile globalIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadDefaultGameIni();
IniFile localIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadLocalGameIni();
IniFile merged = SConfig::GetInstance().LoadGameIni();
IniFile globalIni = SConfig::GetInstance().LoadDefaultGameIni();
IniFile localIni = SConfig::GetInstance().LoadLocalGameIni();
LoadPatchSection("OnFrame", onFrame, globalIni, localIni);
ActionReplay::LoadCodes(globalIni, localIni, false);

View File

@ -195,7 +195,7 @@ void Interpreter::Run()
while (!PowerPC::GetState())
{
//we have to check exceptions at branches apparently (or maybe just rfi?)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
#ifdef SHOW_HISTORY
PCBlockVec.push_back(PC);

View File

@ -376,7 +376,7 @@ void Interpreter::dcbtst(UGeckoInstruction _inst)
void Interpreter::dcbz(UGeckoInstruction _inst)
{
// HACK but works... we think
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bDCBZOFF)
if (!SConfig::GetInstance().bDCBZOFF)
PowerPC::ClearCacheLine(Helper_Get_EA_X(_inst) & (~31));
if (!JitInterface::GetCore())
PowerPC::CheckExceptions();

View File

@ -190,7 +190,7 @@ void Jit64::Init()
// BLR optimization has the same consequences as block linking, as well as
// depending on the fault handler to be safe in the event of excessive BL.
m_enable_blr_optimization = jo.enableBlocklink && SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem && !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging;
m_enable_blr_optimization = jo.enableBlocklink && SConfig::GetInstance().bFastmem && !SConfig::GetInstance().bEnableDebugging;
m_clear_cache_asap = false;
m_stack = nullptr;
@ -494,7 +494,7 @@ void Jit64::Jit(u32 em_address)
farcode.GetSpaceLeft() < 0x10000 ||
trampolines.GetSpaceLeft() < 0x10000 ||
blocks.IsFull() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache ||
SConfig::GetInstance().bJITNoBlockCache ||
m_clear_cache_asap)
{
ClearCache();
@ -502,7 +502,7 @@ void Jit64::Jit(u32 em_address)
int blockSize = code_buffer.GetSize();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
// We can link blocks as long as we are not single stepping and there are no breakpoints here
EnableBlockLink();
@ -599,7 +599,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
fpr.Start();
js.downcountAmount = 0;
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (!SConfig::GetInstance().bEnableDebugging)
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
js.skipInstructions = 0;
@ -750,7 +750,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
js.firstFPInstructionFound = true;
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
if (SConfig::GetInstance().bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
{
// Turn off block linking if there are breakpoints so that the Step Over command does not link this block.
jo.enableBlocklink = false;
@ -889,7 +889,7 @@ BitSet32 Jit64::CallerSavedRegistersInUse()
void Jit64::EnableBlockLink()
{
jo.enableBlocklink = true;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockLinking)
if (SConfig::GetInstance().bJITNoBlockLinking)
jo.enableBlocklink = false;
}

View File

@ -46,7 +46,7 @@ void Jit64AsmRoutineManager::Generate()
ABI_PushRegistersAndAdjustStack({}, 0);
ABI_CallFunction(reinterpret_cast<void *>(&CoreTiming::Advance));
ABI_PopRegistersAndAdjustStack({}, 0);
FixupBranch skipToRealDispatch = J(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging); //skip the sync and compare first time
FixupBranch skipToRealDispatch = J(SConfig::GetInstance().bEnableDebugging); //skip the sync and compare first time
dispatcherMispredictedBLR = GetCodePtr();
AND(32, PPCSTATE(pc), Imm32(0xFFFFFFFC));
@ -68,7 +68,7 @@ void Jit64AsmRoutineManager::Generate()
FixupBranch dbg_exit;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
TEST(32, M(PowerPC::GetStatePtr()), Imm32(PowerPC::CPU_STEPPING));
FixupBranch notStepping = J_CC(CC_Z);
@ -110,7 +110,7 @@ void Jit64AsmRoutineManager::Generate()
FixupBranch no_mem;
FixupBranch exit_mem;
FixupBranch exit_vmem;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
mask = JIT_ICACHE_EXRAM_BIT;
mask |= JIT_ICACHE_VMEM_BIT;
TEST(32, R(RSCRATCH), Imm32(mask));
@ -143,9 +143,9 @@ void Jit64AsmRoutineManager::Generate()
MOV(32, R(RSCRATCH), MRegSum(RSCRATCH2, RSCRATCH));
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) exit_vmem = J();
if (SConfig::GetInstance().bWii) exit_vmem = J();
SetJumpTarget(no_vmem);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_EXRAM_BIT));
FixupBranch no_exram = J_CC(CC_Z);
@ -163,7 +163,7 @@ void Jit64AsmRoutineManager::Generate()
SetJumpTarget(no_exram);
}
SetJumpTarget(exit_mem);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
SetJumpTarget(exit_vmem);
TEST(32, R(RSCRATCH), R(RSCRATCH));
@ -209,7 +209,7 @@ void Jit64AsmRoutineManager::Generate()
J_CC(CC_Z, outerLoop);
//Landing pad for drec space
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
SetJumpTarget(dbg_exit);
ResetStack();
if (m_stack_top)

View File

@ -51,7 +51,7 @@ void Jit64::SetFPRFIfNeeded(X64Reg xmm)
// As far as we know, the games that use this flag only need FPRF for fmul and fmadd, but
// FPRF is fast enough in JIT that we might as well just enable it for every float instruction
// if the FPRF flag is set.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFPRF && js.op->wantsFPRF)
if (SConfig::GetInstance().bFPRF && js.op->wantsFPRF)
SetFPRF(xmm);
}
@ -65,7 +65,7 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm)
// Dragon Ball: Revenge of King Piccolo requires generated NaNs
// to be positive, so we'll have to handle them manually.
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bAccurateNaNs)
if (!SConfig::GetInstance().bAccurateNaNs)
{
if (xmm_out != xmm)
MOVAPD(xmm_out, R(xmm));
@ -185,7 +185,7 @@ void Jit64::fp_arith(UGeckoInstruction inst)
packed = false;
bool round_input = single && !jit->js.op->fprIsSingle[inst.FC];
bool preserve_inputs = SConfig::GetInstance().m_LocalCoreStartupParameter.bAccurateNaNs;
bool preserve_inputs = SConfig::GetInstance().bAccurateNaNs;
X64Reg dest = INVALID_REG;
switch (inst.SUBOP5)
@ -459,7 +459,7 @@ void Jit64::fmrx(UGeckoInstruction inst)
void Jit64::FloatCompare(UGeckoInstruction inst, bool upper)
{
bool fprf = SConfig::GetInstance().m_LocalCoreStartupParameter.bFPRF && js.op->wantsFPRF;
bool fprf = SConfig::GetInstance().bFPRF && js.op->wantsFPRF;
//bool ordered = !!(inst.SUBOP10 & 32);
int a = inst.FA;
int b = inst.FB;

View File

@ -21,9 +21,9 @@ void Jit64::lXXx(UGeckoInstruction inst)
int a = inst.RA, b = inst.RB, d = inst.RD;
// Skip disabled JIT instructions
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87));
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelwzOff && (inst.OPCD == 32));
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87));
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelwzOff && (inst.OPCD == 32));
// Determine memory access size and sign extend
int accessSize = 0;
@ -110,13 +110,13 @@ void Jit64::lXXx(UGeckoInstruction inst)
// ... maybe the throttle one already do that :p
// TODO: We shouldn't use a debug read here. It should be possible to get
// the following instructions out of the JIT state.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle &&
if (SConfig::GetInstance().bSkipIdle &&
PowerPC::GetState() != PowerPC::CPU_STEPPING &&
inst.OPCD == 32 &&
MergeAllowedNextInstructions(2) &&
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
(js.op[1].inst.hex == 0x28000000 ||
(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && js.op[1].inst.hex == 0x2C000000)) &&
(SConfig::GetInstance().bWii && js.op[1].inst.hex == 0x2C000000)) &&
js.op[2].inst.hex == 0x4182fff8)
{
// TODO(LinesPrower):
@ -315,7 +315,7 @@ void Jit64::dcbz(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITLoadStoreOff);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDCBZOFF)
if (SConfig::GetInstance().bDCBZOFF)
return;
int a = inst.RA;
@ -347,7 +347,7 @@ void Jit64::dcbz(UGeckoInstruction inst)
// Mask out the address so we don't write to MEM1 out of bounds
// FIXME: Work out why the AGP disc writes out of bounds
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (!SConfig::GetInstance().bWii)
AND(32, R(RSCRATCH), Imm32(Memory::RAM_MASK));
PXOR(XMM0, R(XMM0));
MOVAPS(MComplex(RMEM, RSCRATCH, SCALE_1, 0), XMM0);

View File

@ -260,7 +260,7 @@ void JitIL::Init()
code_block.m_gpa = &js.gpa;
code_block.m_fpa = &js.fpa;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
JitILProfiler::Init();
}
@ -275,7 +275,7 @@ void JitIL::ClearCache()
void JitIL::Shutdown()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
JitILProfiler::Shutdown();
}
@ -363,7 +363,7 @@ void JitIL::Cleanup()
void JitIL::WriteExit(u32 destination)
{
Cleanup();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
ABI_CallFunction((void *)JitILProfiler::End);
}
@ -396,7 +396,7 @@ void JitIL::WriteExitDestInOpArg(const Gen::OpArg& arg)
{
MOV(32, PPCSTATE(pc), arg);
Cleanup();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
ABI_CallFunction((void *)JitILProfiler::End);
}
@ -409,7 +409,7 @@ void JitIL::WriteRfiExitDestInOpArg(const Gen::OpArg& arg)
MOV(32, PPCSTATE(pc), arg);
MOV(32, PPCSTATE(npc), arg);
Cleanup();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
ABI_CallFunction((void *)JitILProfiler::End);
}
@ -421,7 +421,7 @@ void JitIL::WriteRfiExitDestInOpArg(const Gen::OpArg& arg)
void JitIL::WriteExceptionExit()
{
Cleanup();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
ABI_CallFunction((void *)JitILProfiler::End);
}
@ -474,14 +474,14 @@ void JitIL::Trace()
void JitIL::Jit(u32 em_address)
{
if (GetSpaceLeft() < 0x10000 || farcode.GetSpaceLeft() < 0x10000 || blocks.IsFull() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
SConfig::GetInstance().bJITNoBlockCache)
{
ClearCache();
}
int blockSize = code_buffer.GetSize();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
// We can link blocks as long as we are not single stepping and there are no breakpoints here
EnableBlockLink();
@ -564,8 +564,8 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
js.rewriteStart = (u8*)GetCodePtr();
u64 codeHash = -1;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILOutputIR)
if (SConfig::GetInstance().bJITILTimeProfiling ||
SConfig::GetInstance().bJITILOutputIR)
{
// For profiling and IR Writer
for (u32 i = 0; i < code_block.m_num_instructions; i++)
@ -576,7 +576,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
}
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling)
if (SConfig::GetInstance().bJITILTimeProfiling)
{
JitILProfiler::Block& block = JitILProfiler::Add(codeHash);
ABI_CallFunctionC((void *)JitILProfiler::Begin, block.index);
@ -587,7 +587,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
ibuild.Reset();
js.downcountAmount = 0;
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (!SConfig::GetInstance().bEnableDebugging)
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
// Translate instructions
@ -635,7 +635,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
ibuild.EmitExtExceptionCheck(ibuild.EmitIntConst(ops[i].address));
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
if (SConfig::GetInstance().bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
{
// Turn off block linking if there are breakpoints so that the Step Over command does not link this block.
jo.enableBlocklink = false;
@ -668,7 +668,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
LogGeneratedX86(code_block.m_num_instructions, code_buf, normalEntry, b);
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILOutputIR)
if (SConfig::GetInstance().bJITILOutputIR)
{
ibuild.WriteToFile(codeHash);
}
@ -679,6 +679,6 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
void JitIL::EnableBlockLink()
{
jo.enableBlocklink = true;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockLinking)
if (SConfig::GetInstance().bJITNoBlockLinking)
jo.enableBlocklink = false;
}

View File

@ -241,7 +241,7 @@ void JitArm64::SingleStep()
void JitArm64::Jit(u32)
{
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().bJITNoBlockCache)
{
ClearCache();
}
@ -255,7 +255,7 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB
{
int blockSize = code_buf->GetSize();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
{
// Comment out the following to disable breakpoints (speed-up)
blockSize = 1;
@ -319,7 +319,7 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB
gpr.Start(js.gpa);
fpr.Start(js.fpa);
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (!SConfig::GetInstance().bEnableDebugging)
js.downcountAmount += PatchEngine::GetSpeedhackCycles(em_address);
// Translate instructions

View File

@ -410,11 +410,11 @@ void JitArm64::lXX(UGeckoInstruction inst)
SafeLoadToReg(d, update ? a : (a ? a : -1), offsetReg, flags, offset, update);
// LWZ idle skipping
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle &&
if (SConfig::GetInstance().bSkipIdle &&
inst.OPCD == 32 &&
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
(PowerPC::HostRead_U32(js.compilerPC + 4) == 0x28000000 ||
(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && PowerPC::HostRead_U32(js.compilerPC + 4) == 0x2C000000)) &&
(SConfig::GetInstance().bWii && PowerPC::HostRead_U32(js.compilerPC + 4) == 0x2C000000)) &&
PowerPC::HostRead_U32(js.compilerPC + 8) == 0x4182fff8)
{
// if it's still 0, we can wait until the next event

View File

@ -67,7 +67,7 @@ bool JitBase::MergeAllowedNextInstructions(int count)
// Be careful: a breakpoint kills flags in between instructions
for (int i = 1; i <= count; i++)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging &&
if (SConfig::GetInstance().bEnableDebugging &&
PowerPC::breakpoints.IsAddressBreakPoint(js.op[i].address))
return false;
if (js.op[i].isBranchTarget)
@ -79,9 +79,9 @@ bool JitBase::MergeAllowedNextInstructions(int count)
void JitBase::UpdateMemoryOptions()
{
bool any_watchpoints = PowerPC::memchecks.HasAny();
jo.fastmem = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem &&
jo.fastmem = SConfig::GetInstance().bFastmem &&
!any_watchpoints;
jo.memcheck = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU ||
jo.memcheck = SConfig::GetInstance().bMMU ||
any_watchpoints;
jo.alwaysUseMemFuncs = any_watchpoints;

View File

@ -62,8 +62,8 @@ inline OpArg MPIC(const void* address, X64Reg scale_reg, int scale = SCALE_1)
#define FALLBACK_IF(cond) do { if (cond) { FallBackToInterpreter(inst); return; } } while (0)
#define JITDISABLE(setting) FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff || \
SConfig::GetInstance().m_LocalCoreStartupParameter.setting)
#define JITDISABLE(setting) FALLBACK_IF(SConfig::GetInstance().bJITOff || \
SConfig::GetInstance().setting)
class JitBase : public CPUCoreBase
{

View File

@ -36,7 +36,7 @@ using namespace Gen;
return;
}
JitRegister::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_perfDir);
JitRegister::Init(SConfig::GetInstance().m_perfDir);
iCache.fill(JIT_ICACHE_INVALID_BYTE);
iCacheEx.fill(JIT_ICACHE_INVALID_BYTE);

View File

@ -250,7 +250,7 @@ FixupBranch EmuCodeBlock::CheckIfSafeAddress(const OpArg& reg_value, X64Reg reg_
// assuming they'll never do an invalid memory access.
// The slightly more complex check needed for Wii games using the space just above MEM1 isn't
// implemented here yet, since there are no known working Wii MMU games to test it with.
if (jit->jo.memcheck && !SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (jit->jo.memcheck && !SConfig::GetInstance().bWii)
{
if (scratch == reg_addr)
PUSH(scratch);

View File

@ -143,11 +143,11 @@ void JitILBase::bcx(UGeckoInstruction inst)
// If idle skipping is enabled, then this branch will only be reached when the branch is not
// taken.
// TODO: We shouldn't use debug reads here.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle &&
if (SConfig::GetInstance().bSkipIdle &&
inst.hex == 0x4182fff8 &&
(PowerPC::HostRead_U32(js.compilerPC - 8) & 0xFFFF0000) == 0x800D0000 &&
(PowerPC::HostRead_U32(js.compilerPC - 4) == 0x28000000 ||
(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && PowerPC::HostRead_U32(js.compilerPC - 4) == 0x2C000000))
(SConfig::GetInstance().bWii && PowerPC::HostRead_U32(js.compilerPC - 4) == 0x2C000000))
)
{
// Uh, Do nothing.

View File

@ -12,7 +12,7 @@ void JitILBase::fp_arith_s(UGeckoInstruction inst)
FALLBACK_IF(inst.Rc || (inst.SUBOP5 != 25 && inst.SUBOP5 != 20 && inst.SUBOP5 != 21));
// Only the interpreter has "proper" support for (some) FP flags
FALLBACK_IF(inst.SUBOP5 == 25 && SConfig::GetInstance().m_LocalCoreStartupParameter.bFPRF);
FALLBACK_IF(inst.SUBOP5 == 25 && SConfig::GetInstance().bFPRF);
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
switch (inst.SUBOP5)
@ -49,7 +49,7 @@ void JitILBase::fmaddXX(UGeckoInstruction inst)
FALLBACK_IF(inst.Rc);
// Only the interpreter has "proper" support for (some) FP flags
FALLBACK_IF(inst.SUBOP5 == 29 && SConfig::GetInstance().m_LocalCoreStartupParameter.bFPRF);
FALLBACK_IF(inst.SUBOP5 == 29 && SConfig::GetInstance().bFPRF);
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
val = ibuild.EmitFDMul(val, ibuild.EmitLoadFReg(inst.FC));

View File

@ -53,12 +53,12 @@ void JitILBase::lXz(UGeckoInstruction inst)
// TODO: This really should be done somewhere else. Either lower in the IR
// or higher in PPCAnalyst
// TODO: We shouldn't use debug reads here.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle &&
if (SConfig::GetInstance().bSkipIdle &&
PowerPC::GetState() != PowerPC::CPU_STEPPING &&
inst.OPCD == 32 && // Lwx
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
(PowerPC::HostRead_U32(js.compilerPC + 4) == 0x28000000 ||
(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && PowerPC::HostRead_U32(js.compilerPC + 4) == 0x2C000000)) &&
(SConfig::GetInstance().bWii && PowerPC::HostRead_U32(js.compilerPC + 4) == 0x2C000000)) &&
PowerPC::HostRead_U32(js.compilerPC + 8) == 0x4182fff8)
{
val = ibuild.EmitLoad32(addr);
@ -183,7 +183,7 @@ void JitILBase::dcbz(UGeckoInstruction inst)
// TODO!
#if 0
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreOff)
if (SConfig::GetInstance().bJITOff || SConfig::GetInstance().bJITLoadStoreOff)
{
Default(inst);
return;

View File

@ -44,7 +44,7 @@ namespace JitInterface
}
CPUCoreBase *InitJitCore(int core)
{
bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
bMMU = SConfig::GetInstance().bMMU;
bFakeVMEM = !bMMU;
CPUCoreBase *ptr = nullptr;

View File

@ -386,7 +386,7 @@ TryReadInstResult TryReadInstruction(u32 address)
if (UReg_MSR(MSR).IR)
{
// TODO: Use real translation.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && (address & Memory::ADDR_MASK_MEM1))
if (SConfig::GetInstance().bMMU && (address & Memory::ADDR_MASK_MEM1))
{
u32 tlb_addr = TranslateAddress<FLAG_OPCODE>(address);
if (tlb_addr == 0)
@ -886,7 +886,7 @@ union UPTE2
static void GenerateDSIException(u32 effectiveAddress, bool write)
{
// DSI exceptions are only supported in MMU mode.
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
if (!SConfig::GetInstance().bMMU)
{
PanicAlert("Invalid %s to 0x%08x, PC = 0x%08x ", write ? "Write to" : "Read from", effectiveAddress, PC);
return;

View File

@ -221,7 +221,7 @@ static bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
int b_flags = b_info->flags;
// can't reorder around breakpoints
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging &&
if (SConfig::GetInstance().bEnableDebugging &&
(PowerPC::breakpoints.IsAddressBreakPoint(a.address) || PowerPC::breakpoints.IsAddressBreakPoint(b.address)))
return false;
if (b_flags & (FL_SET_CRx | FL_ENDBLOCK | FL_TIMER | FL_EVIL | FL_SET_OE))

View File

@ -171,7 +171,7 @@ void Init(int cpu_core)
ppcState.iCache.Init();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
if (SConfig::GetInstance().bEnableDebugging)
breakpoints.ClearAllTemporary();
}

View File

@ -162,7 +162,7 @@ static std::string DoState(PointerWrap& p)
g_video_backend->DoState(p);
p.DoMarker("video_backend");
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
Wiimote::DoState(p.GetPPtr(), p.GetMode());
p.DoMarker("Wiimote");
@ -316,7 +316,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args)
// Setting up the header
StateHeader header;
memcpy(header.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), 6);
memcpy(header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6);
header.size = g_use_compression ? (u32)buffer_size : 0;
header.time = Common::Timer::GetDoubleTime();
@ -434,7 +434,7 @@ static void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_
StateHeader header;
f.ReadArray(&header, 1);
if (memcmp(SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), header.gameID, 6))
if (memcmp(SConfig::GetInstance().GetUniqueID().c_str(), header.gameID, 6))
{
Core::DisplayMessage(StringFromFormat("State belongs to a different game (ID %.*s)",
6, header.gameID), 2000);
@ -613,7 +613,7 @@ void Shutdown()
static std::string MakeStateFilename(int number)
{
return StringFromFormat("%s%s.s%02i", File::GetUserPath(D_STATESAVES_IDX).c_str(),
SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), number);
SConfig::GetInstance().GetUniqueID().c_str(), number);
}
void Save(int slot, bool wait)

View File

@ -132,7 +132,7 @@ GameFile::GameFile(const QString& fileName)
if (m_valid)
{
IniFile ini = SCoreStartupParameter::LoadGameIni(m_unique_id.toStdString(), m_revision);
IniFile ini = SConfig::LoadGameIni(m_unique_id.toStdString(), m_revision);
std::string issues_temp;
ini.GetIfExists("EmuState", "EmulationStateId", &m_emu_state);
ini.GetIfExists("EmuState", "EmulationIssues", &issues_temp);
@ -260,7 +260,7 @@ QString GameFile::GetDescription(DiscIO::IVolume::ELanguage language) const
QString GameFile::GetDescription() const
{
bool wii = m_platform != DiscIO::IVolume::GAMECUBE_DISC;
return GetDescription(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
return GetDescription(SConfig::GetInstance().GetCurrentLanguage(wii));
}
QString GameFile::GetName(bool prefer_long, DiscIO::IVolume::ELanguage language) const
@ -271,7 +271,7 @@ QString GameFile::GetName(bool prefer_long, DiscIO::IVolume::ELanguage language)
QString GameFile::GetName(bool prefer_long) const
{
bool wii = m_platform != DiscIO::IVolume::GAMECUBE_DISC;
QString name = GetName(prefer_long, SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
QString name = GetName(prefer_long, SConfig::GetInstance().GetCurrentLanguage(wii));
if (name.isEmpty())
{
// No usable name, return filename (better than nothing)

View File

@ -106,7 +106,7 @@ void DMainWindow::StartGame(const QString filename)
m_render_widget->setWindowTitle(tr("Dolphin")); // TODO
m_render_widget->setWindowIcon(windowIcon());
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen)
if (SConfig::GetInstance().bFullscreen)
{
m_render_widget->setWindowFlags(m_render_widget->windowFlags() | Qt::BypassWindowManagerHint);
g_Config.bFullscreen = !g_Config.bBorderlessFullscreen;
@ -117,11 +117,11 @@ void DMainWindow::StartGame(const QString filename)
m_ui->centralWidget->addWidget(m_render_widget.get());
m_ui->centralWidget->setCurrentWidget(m_render_widget.get());
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize)
if (SConfig::GetInstance().bRenderWindowAutoSize)
{
// Resize main window to fit render
m_render_widget->setMinimumSize(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight);
m_render_widget->setMinimumSize(SConfig::GetInstance().iRenderWindowWidth,
SConfig::GetInstance().iRenderWindowHeight);
qApp->processEvents(); // Force a redraw so the window has time to resize
m_render_widget->setMinimumSize(0, 0); // Allow the widget to scale down
}
@ -131,7 +131,7 @@ void DMainWindow::StartGame(const QString filename)
if (!BootManager::BootCore(filename.toStdString()))
{
QMessageBox::critical(this, tr("Fatal error"), tr("Failed to init Core"), QMessageBox::Ok);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen)
if (SConfig::GetInstance().bFullscreen)
m_render_widget->close();
else
m_ui->centralWidget->removeWidget(m_render_widget.get());
@ -179,7 +179,7 @@ void DMainWindow::DoStartPause()
Core::SetState(Core::CORE_RUN);
emit CoreStateChanged(Core::CORE_RUN);
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_render_widget->setCursor(Qt::BlankCursor);
}
@ -236,7 +236,7 @@ bool DMainWindow::OnStop()
return true;
// Ask for confirmation in case the user accidentally clicked Stop / Escape
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
if (SConfig::GetInstance().bConfirmStop)
{
// Pause emulation
Core::SetState(Core::CORE_PAUSE);
@ -273,7 +273,7 @@ bool DMainWindow::Stop()
//if (m_bBatchMode)
// Close(true);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen)
if (SConfig::GetInstance().bFullscreen)
m_render_widget->close();
else
m_ui->centralWidget->removeWidget(m_render_widget.get());

View File

@ -60,7 +60,7 @@ void Resources::Init()
void Resources::UpdatePixmaps()
{
QString dir = QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
QString dir = QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().theme_name));
m_pixmaps[TOOLBAR_OPEN].load(GIFN("open"));
m_pixmaps[TOOLBAR_REFRESH].load(GIFN("refresh"));
m_pixmaps[TOOLBAR_BROWSE].load(GIFN("browse"));

View File

@ -28,7 +28,6 @@
#include "Core/ActionReplay.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/GeckoCode.h"
#include "Core/GeckoCodeConfig.h"
#include "DolphinWX/Frame.h"
@ -154,7 +153,7 @@ void wxCheatsWindow::OnEvent_Close(wxCloseEvent& ev)
void wxCheatsWindow::UpdateGUI()
{
// load code
SCoreStartupParameter parameters = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& parameters = SConfig::GetInstance();
m_gameini_default = parameters.LoadDefaultGameIni();
m_gameini_local = parameters.LoadLocalGameIni();
m_gameini_local_path = File::GetUserPath(D_GAMESETTINGS_IDX) + parameters.GetUniqueID() + ".ini";
@ -168,7 +167,7 @@ void wxCheatsWindow::UpdateGUI()
// write the ISO name in the title
if (Core::IsRunning())
SetTitle(title + ": " + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + " - " + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strName);
SetTitle(title + ": " + parameters.GetUniqueID() + " - " + parameters.m_strName);
else
SetTitle(title);
}
@ -198,7 +197,7 @@ void wxCheatsWindow::Load_ARCodes()
void wxCheatsWindow::Load_GeckoCodes()
{
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID(), true);
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().GetUniqueID(), true);
}
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED(event))

View File

@ -86,7 +86,7 @@ void AdvancedConfigPane::OnClockOverrideSliderChanged(wxCommandEvent& event)
void AdvancedConfigPane::UpdateCPUClock()
{
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
bool wii = SConfig::GetInstance().bWii;
int percent = (int)(std::roundf(SConfig::GetInstance().m_OCFactor * 100.f));
int clock = (int)(std::roundf(SConfig::GetInstance().m_OCFactor * (wii ? 729.f : 486.f)));

View File

@ -86,7 +86,7 @@ void AudioConfigPane::LoadGUIValues()
{
PopulateBackendChoiceBox();
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& startup_params = SConfig::GetInstance();
// Audio DSP Engine
if (startup_params.bDSPHLE)
@ -120,14 +120,14 @@ void AudioConfigPane::RefreshGUI()
void AudioConfigPane::OnDSPEngineRadioBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = m_dsp_engine_radiobox->GetSelection() == 0;
SConfig::GetInstance().bDSPHLE = m_dsp_engine_radiobox->GetSelection() == 0;
SConfig::GetInstance().m_DSPEnableJIT = m_dsp_engine_radiobox->GetSelection() == 1;
AudioCommon::UpdateSoundStream();
}
void AudioConfigPane::OnDPL2DecoderCheckBoxChanged(wxCommandEvent&)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bDPL2Decoder = m_dpl2_decoder_checkbox->IsChecked();
SConfig::GetInstance().bDPL2Decoder = m_dpl2_decoder_checkbox->IsChecked();
}
void AudioConfigPane::OnVolumeSliderChanged(wxCommandEvent& event)
@ -153,7 +153,7 @@ void AudioConfigPane::OnAudioBackendChanged(wxCommandEvent& event)
void AudioConfigPane::OnLatencySpinCtrlChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.iLatency = m_audio_latency_spinctrl->GetValue();
SConfig::GetInstance().iLatency = m_audio_latency_spinctrl->GetValue();
}
void AudioConfigPane::PopulateBackendChoiceBox()

View File

@ -129,7 +129,7 @@ void GameCubeConfigPane::InitializeGUI()
void GameCubeConfigPane::LoadGUIValues()
{
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& startup_params = SConfig::GetInstance();
m_system_lang_choice->SetSelection(startup_params.SelectedLanguage);
m_skip_bios_checkbox->SetValue(startup_params.bHLE_BS2);
@ -212,21 +212,21 @@ void GameCubeConfigPane::RefreshGUI()
void GameCubeConfigPane::OnSystemLanguageChange(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage = m_system_lang_choice->GetSelection();
SConfig::GetInstance().SelectedLanguage = m_system_lang_choice->GetSelection();
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
}
void GameCubeConfigPane::OnOverrideLanguageCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bOverrideGCLanguage = m_override_lang_checkbox->IsChecked();
SConfig::GetInstance().bOverrideGCLanguage = m_override_lang_checkbox->IsChecked();
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
}
void GameCubeConfigPane::OnSkipBiosCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2 = m_skip_bios_checkbox->IsChecked();
SConfig::GetInstance().bHLE_BS2 = m_skip_bios_checkbox->IsChecked();
}
void GameCubeConfigPane::OnSlotAChanged(wxCommandEvent& event)

View File

@ -89,7 +89,7 @@ void GeneralConfigPane::InitializeGUI()
void GeneralConfigPane::LoadGUIValues()
{
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& startup_params = SConfig::GetInstance();
m_dual_core_checkbox->SetValue(startup_params.bCPUThread);
m_idle_skip_checkbox->SetValue(startup_params.bSkipIdle);
@ -121,22 +121,22 @@ void GeneralConfigPane::OnDualCoreCheckBoxChanged(wxCommandEvent& event)
if (Core::IsRunning())
return;
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = m_dual_core_checkbox->IsChecked();
SConfig::GetInstance().bCPUThread = m_dual_core_checkbox->IsChecked();
}
void GeneralConfigPane::OnIdleSkipCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = m_idle_skip_checkbox->IsChecked();
SConfig::GetInstance().bSkipIdle = m_idle_skip_checkbox->IsChecked();
}
void GeneralConfigPane::OnCheatCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats = m_cheats_checkbox->IsChecked();
SConfig::GetInstance().bEnableCheats = m_cheats_checkbox->IsChecked();
}
void GeneralConfigPane::OnForceNTSCJCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = m_force_ntscj_checkbox->IsChecked();
SConfig::GetInstance().bForceNTSCJ = m_force_ntscj_checkbox->IsChecked();
}
void GeneralConfigPane::OnFrameLimitChoiceChanged(wxCommandEvent& event)
@ -151,9 +151,9 @@ void GeneralConfigPane::OnCPUEngineRadioBoxChanged(wxCommandEvent& event)
if (main_frame->g_pCodeWindow)
{
bool using_interp = (SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore == PowerPC::CORE_INTERPRETER);
bool using_interp = (SConfig::GetInstance().iCPUCore == PowerPC::CORE_INTERPRETER);
main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, using_interp);
}
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = cpu_cores[selection].CPUid;
SConfig::GetInstance().iCPUCore = cpu_cores[selection].CPUid;
}

View File

@ -141,7 +141,7 @@ void InterfaceConfigPane::InitializeGUI()
void InterfaceConfigPane::LoadGUIValues()
{
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& startup_params = SConfig::GetInstance();
m_confirm_stop_checkbox->SetValue(startup_params.bConfirmStop);
m_panic_handlers_checkbox->SetValue(startup_params.bUsePanicHandlers);
@ -177,23 +177,23 @@ void InterfaceConfigPane::LoadThemes()
m_theme_choice->Append(wxname);
}
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().theme_name));
}
void InterfaceConfigPane::OnConfirmStopCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop = m_confirm_stop_checkbox->IsChecked();
SConfig::GetInstance().bConfirmStop = m_confirm_stop_checkbox->IsChecked();
}
void InterfaceConfigPane::OnPanicHandlersCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = m_panic_handlers_checkbox->IsChecked();
SConfig::GetInstance().bUsePanicHandlers = m_panic_handlers_checkbox->IsChecked();
SetEnableAlert(m_panic_handlers_checkbox->IsChecked());
}
void InterfaceConfigPane::OnOSDMessagesCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = m_osd_messages_checkbox->IsChecked();
SConfig::GetInstance().bOnScreenDisplayMessages = m_osd_messages_checkbox->IsChecked();
}
void InterfaceConfigPane::OnInterfaceLanguageChoiceChanged(wxCommandEvent& event)
@ -211,7 +211,7 @@ void InterfaceConfigPane::OnPauseOnFocusLostCheckBoxChanged(wxCommandEvent& even
void InterfaceConfigPane::OnThemeSelected(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = WxStrToStr(m_theme_choice->GetStringSelection());
SConfig::GetInstance().theme_name = WxStrToStr(m_theme_choice->GetStringSelection());
main_frame->InitBitmaps();
main_frame->UpdateGameList();

View File

@ -92,7 +92,7 @@ void PathConfigPane::InitializeGUI()
void PathConfigPane::LoadGUIValues()
{
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
const SConfig& startup_params = SConfig::GetInstance();
m_recursive_iso_paths_checkbox->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
m_default_iso_filepicker->SetPath(StrToWxStr(startup_params.m_strDefaultISO));
@ -159,17 +159,17 @@ void PathConfigPane::OnRemoveISOPath(wxCommandEvent& event)
void PathConfigPane::OnDefaultISOChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = WxStrToStr(m_default_iso_filepicker->GetPath());
SConfig::GetInstance().m_strDefaultISO = WxStrToStr(m_default_iso_filepicker->GetPath());
}
void PathConfigPane::OnDVDRootChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = WxStrToStr(m_dvd_root_dirpicker->GetPath());
SConfig::GetInstance().m_strDVDRoot = WxStrToStr(m_dvd_root_dirpicker->GetPath());
}
void PathConfigPane::OnApploaderPathChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strApploader = WxStrToStr(m_apploader_path_filepicker->GetPath());
SConfig::GetInstance().m_strApploader = WxStrToStr(m_apploader_path_filepicker->GetPath());
}
void PathConfigPane::OnNANDRootChanged(wxCommandEvent& event)

View File

@ -235,7 +235,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this);
// Disable controller type selection for certain circumstances.
bool wii_game_started = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || Core::GetState() == Core::CORE_UNINITIALIZED;
bool wii_game_started = SConfig::GetInstance().bWii || Core::GetState() == Core::CORE_UNINITIALIZED;
if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || !wii_game_started)
wiimote_source_ch[i]->Disable();

View File

@ -171,10 +171,10 @@ void CBreakPointWindow::SaveAll()
{
// simply dump all to bp/mc files in a way we can read again
IniFile ini;
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false);
ini.SetLines("BreakPoints", PowerPC::breakpoints.GetStrings());
ini.SetLines("MemoryChecks", PowerPC::memchecks.GetStrings());
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini");
}
void CBreakPointWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
@ -189,7 +189,7 @@ void CBreakPointWindow::LoadAll()
BreakPoints::TBreakPointsStr newbps;
MemChecks::TMemChecksStr newmcs;
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false))
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false))
{
return;
}

View File

@ -22,7 +22,6 @@
#include "Common/StringUtil.h"
#include "Common/SymbolDB.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/Debugger/Debugger_SymbolMap.h"
#include "Core/Debugger/PPCDebugInterface.h"
@ -51,7 +50,7 @@ extern "C" // Bitmaps
#include "DolphinWX/resources/toolbar_add_breakpoint.c" // NOLINT
}
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *parent,
CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame *parent,
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, position, size, style, name)
, Parent(parent)
@ -428,7 +427,7 @@ void CCodeWindow::UpdateCallstack()
}
// Create CPU Mode menus
void CCodeWindow::CreateMenu(const SCoreStartupParameter& core_startup_parameter, wxMenuBar *pMenuBar)
void CCodeWindow::CreateMenu(const SConfig& core_startup_parameter, wxMenuBar *pMenuBar)
{
// CPU Mode
wxMenu* pCoreMenu = new wxMenu;
@ -552,37 +551,37 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
bAutomaticStart = !bAutomaticStart;
return;
case IDM_JIT_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff = event.IsChecked();
SConfig::GetInstance().bJITOff = event.IsChecked();
break;
case IDM_JIT_LS_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStoreOff = event.IsChecked();
break;
case IDM_JIT_LSLXZ_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStorelXzOff = event.IsChecked();
break;
case IDM_JIT_LSLWZ_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStorelwzOff = event.IsChecked();
break;
case IDM_JIT_LSLBZX_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStorelbzxOff = event.IsChecked();
break;
case IDM_JIT_LSF_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStoreFloatingOff = event.IsChecked();
break;
case IDM_JIT_LSP_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked();
SConfig::GetInstance().bJITLoadStorePairedOff = event.IsChecked();
break;
case IDM_JIT_FP_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITFloatingPointOff = event.IsChecked();
SConfig::GetInstance().bJITFloatingPointOff = event.IsChecked();
break;
case IDM_JIT_I_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITIntegerOff = event.IsChecked();
SConfig::GetInstance().bJITIntegerOff = event.IsChecked();
break;
case IDM_JIT_P_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITPairedOff = event.IsChecked();
SConfig::GetInstance().bJITPairedOff = event.IsChecked();
break;
case IDM_JIT_SR_OFF:
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITSystemRegistersOff = event.IsChecked();
SConfig::GetInstance().bJITSystemRegistersOff = event.IsChecked();
break;
}

View File

@ -21,7 +21,7 @@ class CJitWindow;
class CCodeView;
class DSPDebuggerLLE;
class GFXDebuggerPanel;
struct SCoreStartupParameter;
struct SConfig;
class wxAuiToolBar;
class wxListBox;
@ -32,7 +32,7 @@ class wxToolBar;
class CCodeWindow : public wxPanel
{
public:
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
CCodeWindow(const SConfig& _LocalCoreStartupParameter,
CFrame * parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
@ -59,7 +59,7 @@ public:
void Update() override;
void NotifyMapLoaded();
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
void CreateMenu(const SConfig& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
void CreateMenuOptions(wxMenu *pMenu);
void CreateMenuSymbols(wxMenuBar *pMenuBar);
void RecreateToolbar(wxToolBar*);

View File

@ -14,7 +14,6 @@
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Debugger/DebuggerPanel.h"
#include "VideoCommon/Debugger.h"
@ -269,7 +268,7 @@ void GFXDebuggerPanel::OnPauseAtNextFrameButton(wxCommandEvent& event)
void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event)
{
std::string dump_path = File::GetUserPath(D_DUMP_IDX) + "Debug/" +
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID + "/";
SConfig::GetInstance().m_strUniqueID + "/";
if (!File::CreateFullPath(dump_path))
return;

View File

@ -21,7 +21,6 @@
#include "Common/StringUtil.h"
#include "Common/SymbolDB.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "Core/Debugger/PPCDebugInterface.h"
#include "Core/HW/DSP.h"
#include "Core/HW/Memmap.h"
@ -92,7 +91,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
sizerRight->Add(new wxButton(this, IDM_DUMP_MEMORY, _("Dump MRAM")));
sizerRight->Add(new wxButton(this, IDM_DUMP_MEM2, _("Dump EXRAM")));
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
if (!SConfig::GetInstance().bMMU)
sizerRight->Add(new wxButton(this, IDM_DUMP_FAKEVMEM, _("Dump FakeVMEM")));
wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
@ -262,7 +261,7 @@ void CMemoryWindow::OnDumpMemory( wxCommandEvent& event )
// Write exram (aram or mem2) to file
void CMemoryWindow::OnDumpMem2( wxCommandEvent& event )
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (SConfig::GetInstance().bWii)
{
DumpArray(File::GetUserPath(F_ARAMDUMP_IDX), Memory::m_pEXRAM, Memory::EXRAM_SIZE);
}

View File

@ -91,9 +91,9 @@ void CWatchWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event))
void CWatchWindow::SaveAll()
{
IniFile ini;
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false);
ini.SetLines("Watches", PowerPC::watches.GetStrings());
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini");
}
void CWatchWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
@ -106,7 +106,7 @@ void CWatchWindow::LoadAll()
IniFile ini;
Watches::TWatchesStr watches;
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false))
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false))
{
return;
}

View File

@ -34,7 +34,6 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/HotkeyManager.h"
#include "Core/Movie.h"
#include "Core/State.h"
@ -147,7 +146,7 @@ bool CRenderFrame::IsValidSavestateDropped(const std::string& filepath)
std::string internal_game_id(game_id_length, ' ');
file.read(&internal_game_id[0], game_id_length);
return internal_game_id == SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID();
return internal_game_id == SConfig::GetInstance().GetUniqueID();
}
#ifdef _WIN32
@ -160,7 +159,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
if (Core::GetState() == Core::CORE_RUN && SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
if (Core::GetState() == Core::CORE_RUN && SConfig::GetInstance().bDisableScreenSaver)
break;
default:
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
@ -175,7 +174,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
break;
case WM_USER_SETCURSOR:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
if (SConfig::GetInstance().bHideCursor &&
main_frame->RendererHasFocus() && Core::GetState() == Core::CORE_RUN)
SetCursor(wxCURSOR_BLANK);
else
@ -393,7 +392,7 @@ CFrame::CFrame(wxFrame* parent,
// Debugger class
if (UseDebugger)
{
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance().m_LocalCoreStartupParameter, this, IDM_CODE_WINDOW);
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance(), this, IDM_CODE_WINDOW);
LoadIniPerspectives();
g_pCodeWindow->Load();
}
@ -562,16 +561,16 @@ void CFrame::OnActive(wxActivateEvent& event)
{
if (event.GetActive() && event.GetEventObject() == m_RenderFrame)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
if (SConfig::GetInstance().bRenderToMain)
m_RenderParent->SetFocus();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
if (SConfig::GetInstance().bHideCursor &&
Core::GetState() == Core::CORE_RUN)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
else
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxNullCursor);
}
}
@ -642,10 +641,10 @@ void CFrame::OnMove(wxMoveEvent& event)
event.Skip();
if (!IsMaximized() &&
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()))
!(SConfig::GetInstance().bRenderToMain && RendererIsFullscreen()))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX = GetPosition().x;
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY = GetPosition().y;
SConfig::GetInstance().iPosX = GetPosition().x;
SConfig::GetInstance().iPosY = GetPosition().y;
}
}
@ -654,13 +653,13 @@ void CFrame::OnResize(wxSizeEvent& event)
event.Skip();
if (!IsMaximized() &&
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()) &&
!(SConfig::GetInstance().bRenderToMain && RendererIsFullscreen()) &&
!(Core::GetState() != Core::CORE_UNINITIALIZED &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize))
SConfig::GetInstance().bRenderToMain &&
SConfig::GetInstance().bRenderWindowAutoSize))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth = GetSize().GetWidth();
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight = GetSize().GetHeight();
SConfig::GetInstance().iWidth = GetSize().GetWidth();
SConfig::GetInstance().iHeight = GetSize().GetHeight();
}
// Make sure the logger pane is a sane size
@ -700,7 +699,7 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
void CFrame::UpdateTitle(const std::string &str)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
if (SConfig::GetInstance().bRenderToMain &&
SConfig::GetInstance().m_InterfaceStatusbar)
{
GetStatusBar()->SetStatusText(str, 0);
@ -754,7 +753,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
break;
case WM_USER_CREATE:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
break;
@ -783,7 +782,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
void CFrame::OnRenderWindowSizeRequest(int width, int height)
{
if (!Core::IsRunning() ||
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize ||
!SConfig::GetInstance().bRenderWindowAutoSize ||
RendererIsFullscreen() || m_RenderFrame->IsMaximized())
return;
@ -791,7 +790,7 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height)
m_RenderFrame->GetClientSize(&old_width, &old_height);
// Add space for the log/console/debugger window
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
if (SConfig::GetInstance().bRenderToMain &&
(SConfig::GetInstance().m_InterfaceLogWindow ||
SConfig::GetInstance().m_InterfaceLogConfigWindow) &&
!m_Mgr->GetPane("Pane 1").IsFloating())
@ -1134,7 +1133,7 @@ void CFrame::OnFocusChange(wxFocusEvent& event)
if (Core::GetState() == Core::CORE_PAUSE)
{
Core::SetState(Core::CORE_RUN);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
}
@ -1143,7 +1142,7 @@ void CFrame::OnFocusChange(wxFocusEvent& event)
if (Core::GetState() == Core::CORE_RUN)
{
Core::SetState(Core::CORE_PAUSE);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxNullCursor);
Core::UpdateTitle();
}
@ -1189,7 +1188,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
}
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
if (SConfig::GetInstance().bRenderToMain)
{
if (enable_fullscreen)
{
@ -1341,7 +1340,7 @@ void CFrame::ParseHotkeys()
WiimoteId = 4;
// Actually perform the Wiimote connection or disconnection
if (WiimoteId >= 0 && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (WiimoteId >= 0 && SConfig::GetInstance().bWii)
{
wxCommandEvent evt;
evt.SetId(IDM_CONNECT_WIIMOTE1 + WiimoteId);

View File

@ -34,7 +34,6 @@
#include "Core/BootManager.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/HotkeyManager.h"
#include "Core/Movie.h"
@ -369,7 +368,7 @@ wxMenuBar* CFrame::CreateMenu()
if (g_pCodeWindow)
{
g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, menubar);
g_pCodeWindow->CreateMenu(SConfig::GetInstance(), menubar);
}
// Help menu
@ -585,7 +584,7 @@ void CFrame::RecreateToolbar()
void CFrame::InitBitmaps()
{
auto const dir = StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
auto const dir = StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name));
m_Bitmaps[Toolbar_FileOpen ].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Refresh ].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG);
@ -615,7 +614,7 @@ void CFrame::InitBitmaps()
void CFrame::BootGame(const std::string& filename)
{
std::string bootfile = filename;
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& StartUp = SConfig::GetInstance();
if (Core::GetState() != Core::CORE_UNINITIALIZED)
return;
@ -721,7 +720,7 @@ void CFrame::OnTASInput(wxCommandEvent& event)
g_TASInputDlg[i]->SetTitle(wxString::Format(_("TAS Input - Controller %d"), i + 1));
}
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU && !(Core::IsRunning() && !SConfig::GetInstance().m_LocalCoreStartupParameter.bWii))
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU && !(Core::IsRunning() && !SConfig::GetInstance().bWii))
{
g_TASInputDlg[i+4]->CreateWiiLayout(i);
g_TASInputDlg[i+4]->Show();
@ -889,8 +888,8 @@ void CFrame::OnRenderParentMove(wxMoveEvent& event)
if (Core::GetState() != Core::CORE_UNINITIALIZED &&
!RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized())
{
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos = m_RenderFrame->GetPosition().x;
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos = m_RenderFrame->GetPosition().y;
SConfig::GetInstance().iRenderWindowXPos = m_RenderFrame->GetPosition().x;
SConfig::GetInstance().iRenderWindowYPos = m_RenderFrame->GetPosition().y;
}
event.Skip();
}
@ -900,12 +899,12 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
int width, height;
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
if (!SConfig::GetInstance().bRenderToMain &&
!RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized())
{
m_RenderFrame->GetClientSize(&width, &height);
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth = width;
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight = height;
SConfig::GetInstance().iRenderWindowWidth = width;
SConfig::GetInstance().iRenderWindowHeight = height;
}
m_LogWindow->Refresh();
m_LogWindow->Update();
@ -916,12 +915,12 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
void CFrame::ToggleDisplayMode(bool bFullscreen)
{
#ifdef _WIN32
if (bFullscreen && SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
if (bFullscreen && SConfig::GetInstance().strFullscreenResolution != "Auto")
{
DEVMODE dmScreenSettings;
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
sscanf(SConfig::GetInstance().strFullscreenResolution.c_str(),
"%dx%d", &dmScreenSettings.dmPelsWidth, &dmScreenSettings.dmPelsHeight);
dmScreenSettings.dmBitsPerPel = 32;
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
@ -935,7 +934,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
ChangeDisplaySettings(nullptr, CDS_FULLSCREEN);
}
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
if (SConfig::GetInstance().strFullscreenResolution != "Auto")
m_XRRConfig->ToggleDisplayMode(bFullscreen);
#endif
}
@ -951,7 +950,7 @@ void CFrame::StartGame(const std::string& filename)
m_ToolBar->EnableTool(IDM_PLAY, false);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
if (SConfig::GetInstance().bRenderToMain)
{
// Game has been started, hide the game list
m_GameListCtrl->Disable();
@ -959,7 +958,7 @@ void CFrame::StartGame(const std::string& filename)
m_RenderParent = m_Panel;
m_RenderFrame = this;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop)
if (SConfig::GetInstance().bKeepWindowOnTop)
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() | wxSTAY_ON_TOP);
else
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
@ -972,8 +971,8 @@ void CFrame::StartGame(const std::string& filename)
}
else
{
wxPoint position(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos);
wxPoint position(SConfig::GetInstance().iRenderWindowXPos,
SConfig::GetInstance().iRenderWindowYPos);
#ifdef __APPLE__
// On OS X, the render window's title bar is not visible,
// and the window therefore not easily moved, when the
@ -982,8 +981,8 @@ void CFrame::StartGame(const std::string& filename)
position = wxDefaultPosition;
#endif
wxSize size(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight);
wxSize size(SConfig::GetInstance().iRenderWindowWidth,
SConfig::GetInstance().iRenderWindowHeight);
#ifdef _WIN32
// Out of desktop check
int leftPos = GetSystemMetrics(SM_XVIRTUALSCREEN);
@ -994,7 +993,7 @@ void CFrame::StartGame(const std::string& filename)
position.x = position.y = wxDefaultCoord;
#endif
m_RenderFrame = new CRenderFrame((wxFrame*)this, wxID_ANY, _("Dolphin"), position);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop)
if (SConfig::GetInstance().bKeepWindowOnTop)
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() | wxSTAY_ON_TOP);
else
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
@ -1024,13 +1023,13 @@ void CFrame::StartGame(const std::string& filename)
wxBeginBusyCursor();
DoFullscreen(SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen);
DoFullscreen(SConfig::GetInstance().bFullscreen);
if (!BootManager::BootCore(filename))
{
DoFullscreen(false);
// Destroy the renderer frame when not rendering to main
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
if (!SConfig::GetInstance().bRenderToMain)
m_RenderFrame->Destroy();
m_RenderParent = nullptr;
m_bGameLoading = false;
@ -1039,7 +1038,7 @@ void CFrame::StartGame(const std::string& filename)
else
{
#if defined(HAVE_X11) && HAVE_X11
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
if (SConfig::GetInstance().bDisableScreenSaver)
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
X11Utils::XWindowFromHandle(GetHandle()), true);
#endif
@ -1094,14 +1093,14 @@ void CFrame::DoPause()
if (Core::GetState() == Core::CORE_RUN)
{
Core::SetState(Core::CORE_PAUSE);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxNullCursor);
Core::UpdateTitle();
}
else
{
Core::SetState(Core::CORE_RUN);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
if (SConfig::GetInstance().bHideCursor &&
RendererHasFocus())
m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
@ -1129,7 +1128,7 @@ void CFrame::DoStop()
wxMutexGuiEnter();
#endif
// Ask for confirmation in case the user accidentally clicked Stop / Escape
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
if (SConfig::GetInstance().bConfirmStop)
{
// Exit fullscreen to ensure it does not cover the stop dialog.
DoFullscreen(false);
@ -1140,7 +1139,7 @@ void CFrame::DoStop()
// If exclusive fullscreen is not enabled then we can pause the emulation
// before we've exited fullscreen. If not then we need to exit fullscreen first.
if (!RendererIsFullscreen() || !g_Config.ExclusiveFullscreenEnabled() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
SConfig::GetInstance().bRenderToMain)
{
Core::SetState(Core::CORE_PAUSE);
}
@ -1198,7 +1197,7 @@ void CFrame::OnStopped()
m_confirmStop = false;
#if defined(HAVE_X11) && HAVE_X11
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
if (SConfig::GetInstance().bDisableScreenSaver)
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
X11Utils::XWindowFromHandle(GetHandle()), false);
#endif
@ -1213,10 +1212,10 @@ void CFrame::OnStopped()
wxTheApp->Unbind(wxEVT_MIDDLE_DOWN, &CFrame::OnMouse, this);
wxTheApp->Unbind(wxEVT_MIDDLE_UP, &CFrame::OnMouse, this);
wxTheApp->Unbind(wxEVT_MOTION, &CFrame::OnMouse, this);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
m_RenderParent->SetCursor(wxNullCursor);
DoFullscreen(false);
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
if (!SConfig::GetInstance().bRenderToMain)
{
m_RenderFrame->Destroy();
}
@ -1246,10 +1245,10 @@ void CFrame::OnStopped()
Close(true);
// If using auto size with render to main, reset the application size.
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize)
SetSize(SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth,
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight);
if (SConfig::GetInstance().bRenderToMain &&
SConfig::GetInstance().bRenderWindowAutoSize)
SetSize(SConfig::GetInstance().iWidth,
SConfig::GetInstance().iHeight);
m_GameListCtrl->Enable();
m_GameListCtrl->Show();
@ -1541,7 +1540,7 @@ void CFrame::OnFifoPlayer(wxCommandEvent& WXUNUSED (event))
void CFrame::ConnectWiimote(int wm_idx, bool connect)
{
if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (Core::IsRunning() && SConfig::GetInstance().bWii)
{
bool was_unpaused = Core::PauseAndLock(true);
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
@ -1569,13 +1568,13 @@ void CFrame::OnToggleFullscreen(wxCommandEvent& WXUNUSED (event))
void CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
SConfig::GetInstance().bCPUThread = !SConfig::GetInstance().bCPUThread;
SConfig::GetInstance().SaveSettings();
}
void CFrame::OnToggleSkipIdle(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = !SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
SConfig::GetInstance().bSkipIdle = !SConfig::GetInstance().bSkipIdle;
SConfig::GetInstance().SaveSettings();
}
@ -1699,7 +1698,7 @@ void CFrame::UpdateGUI()
bool Running = Core::GetState() == Core::CORE_RUN;
bool Paused = Core::GetState() == Core::CORE_PAUSE;
bool Stopping = Core::GetState() == Core::CORE_STOPPING;
bool RunningWii = Initialized && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
bool RunningWii = Initialized && SConfig::GetInstance().bWii;
// Make sure that we have a toolbar
if (m_ToolBar)
@ -1746,7 +1745,7 @@ void CFrame::UpdateGUI()
GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->Enable(!Initialized);
// Tools
GetMenuBar()->FindItem(IDM_CHEATS)->Enable(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
GetMenuBar()->FindItem(IDM_CHEATS)->Enable(SConfig::GetInstance().bEnableCheats);
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Enable(RunningWii);
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->Enable(RunningWii);
@ -1798,7 +1797,7 @@ void CFrame::UpdateGUI()
if (m_GameListCtrl->IsEnabled())
{
// Prepare to load Default ISO, enable play button
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO.empty())
if (!SConfig::GetInstance().m_strDefaultISO.empty())
{
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);
@ -1866,7 +1865,7 @@ void CFrame::UpdateGUI()
// Update non-modal windows
if (g_CheatsWindow)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
if (SConfig::GetInstance().bEnableCheats)
g_CheatsWindow->UpdateGUI();
else
g_CheatsWindow->Close();

View File

@ -36,7 +36,6 @@
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Movie.h"
#include "Core/Boot/Boot.h"
#include "Core/HW/DVDInterface.h"
@ -85,8 +84,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
sortData = -sortData;
}
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso1->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso2->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().GetCurrentLanguage(iso1->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().GetCurrentLanguage(iso2->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
switch (sortData)
{
@ -411,7 +410,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
}
std::string title;
IniFile gameini = SCoreStartupParameter::LoadGameIni(rISOFile.GetUniqueID(), rISOFile.GetRevision());
IniFile gameini = SConfig::LoadGameIni(rISOFile.GetUniqueID(), rISOFile.GetRevision());
if (gameini.GetIfExists("EmuState", "Title", &title))
name = title;
@ -851,8 +850,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu.AppendCheckItem(IDM_SET_DEFAULT_ISO, _("Set as &default ISO"));
// First we have to decide a starting value when we append it
if (selected_iso->GetFileName() == SConfig::GetInstance().
m_LocalCoreStartupParameter.m_strDefaultISO)
if (selected_iso->GetFileName() == SConfig::GetInstance().m_strDefaultISO)
popupMenu.FindItem(IDM_SET_DEFAULT_ISO)->Check();
popupMenu.AppendSeparator();
@ -967,14 +965,14 @@ void CGameListCtrl::OnSetDefaultISO(wxCommandEvent& event)
if (event.IsChecked())
{
// Write the new default value and save it the ini file
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO =
SConfig::GetInstance().m_strDefaultISO =
iso->GetFileName();
SConfig::GetInstance().SaveSettings();
}
else
{
// Otherwise blank the value and save it
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = "";
SConfig::GetInstance().m_strDefaultISO = "";
SConfig::GetInstance().SaveSettings();
}
}

View File

@ -24,7 +24,6 @@
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "Core/Boot/Boot.h"
#include "DiscIO/CompressedBlob.h"
@ -124,7 +123,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
if (IsValid())
{
IniFile ini = SCoreStartupParameter::LoadGameIni(m_UniqueID, m_Revision);
IniFile ini = SConfig::LoadGameIni(m_UniqueID, m_Revision);
ini.GetIfExists("EmuState", "EmulationStateId", &m_emu_state);
ini.GetIfExists("EmuState", "EmulationIssues", &m_issues);
}
@ -145,7 +144,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
else
{
// default banner
m_Bitmap.LoadFile(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)) + "nobanner.png", wxBITMAP_TYPE_PNG);
m_Bitmap.LoadFile(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name)) + "nobanner.png", wxBITMAP_TYPE_PNG);
}
}
@ -215,7 +214,7 @@ std::string GameListItem::GetDescription(DiscIO::IVolume::ELanguage language) co
std::string GameListItem::GetDescription() const
{
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
return GetDescription(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
return GetDescription(SConfig::GetInstance().GetCurrentLanguage(wii));
}
std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
@ -226,7 +225,7 @@ std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
std::string GameListItem::GetName() const
{
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
std::string name = GetName(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
std::string name = GetName(SConfig::GetInstance().GetCurrentLanguage(wii));
if (name.empty())
{
// No usable name, return filename (better than nothing)

View File

@ -54,7 +54,6 @@
#include "Common/SysConf.h"
#include "Core/ActionReplay.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "Core/GeckoCodeConfig.h"
#include "Core/PatchEngine.h"
#include "Core/Boot/Boot.h"
@ -119,8 +118,8 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
// Load game INIs
GameIniFileLocal = File::GetUserPath(D_GAMESETTINGS_IDX) + game_id + ".ini";
GameIniDefault = SCoreStartupParameter::LoadDefaultGameIni(game_id, OpenISO->GetRevision());
GameIniLocal = SCoreStartupParameter::LoadLocalGameIni(game_id, OpenISO->GetRevision());
GameIniDefault = SConfig::LoadDefaultGameIni(game_id, OpenISO->GetRevision());
GameIniLocal = SConfig::LoadLocalGameIni(game_id, OpenISO->GetRevision());
// Setup GUI
OpenGameListItem = new GameListItem(fileName);
@ -190,7 +189,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
// Here we set all the info to be shown + we set the window title
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
ChangeBannerDetails(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
ChangeBannerDetails(SConfig::GetInstance().GetCurrentLanguage(wii));
m_Banner->SetBitmap(OpenGameListItem->GetBitmap());
m_Banner->Bind(wxEVT_RIGHT_DOWN, &CISOProperties::RightClickOnBanner, this);
@ -490,7 +489,7 @@ void CISOProperties::CreateGUIControls()
wxStaticText* const m_LangText = new wxStaticText(m_Information, wxID_ANY, _("Show Language:"));
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii);
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().GetCurrentLanguage(wii);
std::vector<DiscIO::IVolume::ELanguage> languages = OpenGameListItem->GetLanguages();
int preferred_language_index = 0;
@ -628,7 +627,7 @@ void CISOProperties::CreateGUIControls()
// If there is no default gameini, disable the button.
bool game_ini_exists = false;
for (const std::string& ini_filename : SCoreStartupParameter::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
for (const std::string& ini_filename : SConfig::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
{
if (File::Exists(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + ini_filename))
{
@ -1283,7 +1282,7 @@ void CISOProperties::OnComputeMD5Sum(wxCommandEvent& WXUNUSED (event))
// they will all be opened, but there is usually only one
void CISOProperties::OnShowDefaultConfig(wxCommandEvent& WXUNUSED (event))
{
for (const std::string& filename : SCoreStartupParameter::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
for (const std::string& filename : SConfig::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
{
std::string path = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename;
if (File::Exists(path))

View File

@ -30,7 +30,6 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/Movie.h"
#include "Core/HW/Wiimote.h"
@ -210,31 +209,31 @@ bool DolphinApp::OnInit()
if (selectPerfDir)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_perfDir =
SConfig::GetInstance().m_perfDir =
WxStrToStr(perfDir);
}
if (selectVideoBackend && videoBackendName != wxEmptyString)
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
SConfig::GetInstance().m_strVideoBackend =
WxStrToStr(videoBackendName);
if (selectAudioEmulation)
{
if (audioEmulationName == "HLE")
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = true;
SConfig::GetInstance().bDSPHLE = true;
else if (audioEmulationName == "LLE")
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = false;
SConfig::GetInstance().bDSPHLE = false;
}
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
VideoBackend::ActivateBackend(SConfig::GetInstance().m_strVideoBackend);
// Enable the PNG image handler for screenshots
wxImage::AddHandler(new wxPNGHandler);
int x = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX;
int y = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY;
int w = SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth;
int h = SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight;
int x = SConfig::GetInstance().iPosX;
int y = SConfig::GetInstance().iPosY;
int w = SConfig::GetInstance().iWidth;
int h = SConfig::GetInstance().iHeight;
if (File::Exists("www.dolphin-emulator.com.txt"))
{
@ -479,7 +478,7 @@ void Host_RequestFullscreen(bool enable_fullscreen)
void Host_SetStartupDebuggingParameters()
{
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& StartUp = SConfig::GetInstance();
if (main_frame->g_pCodeWindow)
{
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();

View File

@ -226,7 +226,7 @@ static std::string GetTitle(std::string filename)
/*
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(is_wii_title);
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
auto it = titles.find(language);
if (it != end)
@ -267,7 +267,7 @@ static std::string GetDescription(std::string filename)
/*
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(is_wii_title);
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
auto it = descriptions.find(language);
if (it != end)

View File

@ -15,7 +15,6 @@
#include "Core/BootManager.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/State.h"
#include "Core/HW/Wiimote.h"
@ -77,7 +76,7 @@ void Host_RequestFullscreen(bool enable_fullscreen) {}
void Host_SetStartupDebuggingParameters()
{
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
SConfig& StartUp = SConfig::GetInstance();
StartUp.bEnableDebugging = false;
StartUp.bBootToPause = false;
}
@ -99,7 +98,7 @@ bool Host_RendererIsFullscreen()
void Host_ConnectWiimote(int wm_idx, bool connect)
{
if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
if (Core::IsRunning() && SConfig::GetInstance().bWii)
{
bool was_unpaused = Core::PauseAndLock(true);
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
@ -136,10 +135,10 @@ class PlatformX11 : public Platform
}
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight,
SConfig::GetInstance().iRenderWindowXPos,
SConfig::GetInstance().iRenderWindowYPos,
SConfig::GetInstance().iRenderWindowWidth,
SConfig::GetInstance().iRenderWindowHeight,
0, 0, BlackPixel(dpy, 0));
XSelectInput(dpy, win, KeyPressMask | FocusChangeMask);
Atom wmProtocols[1];
@ -149,14 +148,14 @@ class PlatformX11 : public Platform
XFlush(dpy);
s_window_handle = (void*)win;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
if (SConfig::GetInstance().bDisableScreenSaver)
X11Utils::InhibitScreensaver(dpy, win, true);
#if defined(HAVE_XRANDR) && HAVE_XRANDR
XRRConfig = new X11Utils::XRRConfiguration(dpy, win);
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
{
// make a blank cursor
Pixmap Blank;
@ -176,7 +175,7 @@ class PlatformX11 : public Platform
void MainLoop() override
{
bool fullscreen = SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen;
bool fullscreen = SConfig::GetInstance().bFullscreen;
if (fullscreen)
{
@ -202,13 +201,13 @@ class PlatformX11 : public Platform
{
if (Core::GetState() == Core::CORE_RUN)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
XUndefineCursor(dpy, win);
Core::SetState(Core::CORE_PAUSE);
}
else
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
XDefineCursor(dpy, win, blankCursor);
Core::SetState(Core::CORE_RUN);
}
@ -243,13 +242,13 @@ class PlatformX11 : public Platform
break;
case FocusIn:
rendererHasFocus = true;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
if (SConfig::GetInstance().bHideCursor &&
Core::GetState() != Core::CORE_PAUSE)
XDefineCursor(dpy, win, blankCursor);
break;
case FocusOut:
rendererHasFocus = false;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
XUndefineCursor(dpy, win);
break;
case ClientMessage:
@ -263,10 +262,10 @@ class PlatformX11 : public Platform
Window winDummy;
unsigned int borderDummy, depthDummy;
XGetGeometry(dpy, win, &winDummy,
&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos,
(unsigned int *)&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
(unsigned int *)&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight,
&SConfig::GetInstance().iRenderWindowXPos,
&SConfig::GetInstance().iRenderWindowYPos,
(unsigned int *)&SConfig::GetInstance().iRenderWindowWidth,
(unsigned int *)&SConfig::GetInstance().iRenderWindowHeight,
&borderDummy, &depthDummy);
rendererIsFullscreen = false;
}
@ -280,7 +279,7 @@ class PlatformX11 : public Platform
delete XRRConfig;
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
if (SConfig::GetInstance().bHideCursor)
XFreeCursor(dpy, blankCursor);
XCloseDisplay(dpy);

View File

@ -28,7 +28,6 @@
#include "Common/IniFile.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "Core/NetPlayClient.h"
#include "Core/NetPlayProto.h"
#include "Core/NetPlayServer.h"
@ -251,9 +250,9 @@ void NetPlayDialog::OnChat(wxCommandEvent&)
void NetPlayDialog::GetNetSettings(NetSettings &settings)
{
SConfig &instance = SConfig::GetInstance();
settings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread;
settings.m_CPUcore = instance.m_LocalCoreStartupParameter.iCPUCore;
settings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE;
settings.m_CPUthread = instance.bCPUThread;
settings.m_CPUcore = instance.iCPUCore;
settings.m_DSPHLE = instance.bDSPHLE;
settings.m_DSPEnableJIT = instance.m_DSPEnableJIT;
settings.m_WriteToMemcard = m_memcard_write->GetValue();
settings.m_OCEnable = instance.m_OCEnable;

View File

@ -31,7 +31,7 @@ public:
Close();
g_video_backend = new_backend;
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
SConfig::GetInstance().m_strVideoBackend = g_video_backend->GetName();
g_video_backend->ShowConfig(GetParent());
}

View File

@ -22,7 +22,6 @@
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/Frame.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/VideoConfigDiag.h"
@ -282,7 +281,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
RegisterControl(choice_display_resolution, wxGetTranslation(display_res_desc));
choice_display_resolution->Bind(wxEVT_CHOICE, &VideoConfigDiag::Event_DisplayResolution, this);
choice_display_resolution->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution));
choice_display_resolution->SetStringSelection(StrToWxStr(SConfig::GetInstance().strFullscreenResolution));
szr_display->Add(label_display_resolution, 1, wxALIGN_CENTER_VERTICAL, 0);
szr_display->Add(choice_display_resolution);
@ -302,7 +301,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// various other display options
{
szr_display->Add(CreateCheckBox(page_general, _("V-Sync"), wxGetTranslation(vsync_desc), vconfig.bVSync));
szr_display->Add(CreateCheckBox(page_general, _("Use Fullscreen"), wxGetTranslation(use_fullscreen_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen));
szr_display->Add(CreateCheckBox(page_general, _("Use Fullscreen"), wxGetTranslation(use_fullscreen_desc), SConfig::GetInstance().bFullscreen));
}
}
@ -312,10 +311,10 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
{
szr_other->Add(CreateCheckBox(page_general, _("Show FPS"), wxGetTranslation(show_fps_desc), vconfig.bShowFPS));
szr_other->Add(CreateCheckBox(page_general, _("Log Render Time to File"), wxGetTranslation(log_render_time_to_file_desc), vconfig.bLogRenderTimeToFile));
szr_other->Add(CreateCheckBox(page_general, _("Auto adjust Window Size"), wxGetTranslation(auto_window_size_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize));
szr_other->Add(CreateCheckBox(page_general, _("Keep Window on Top"), wxGetTranslation(keep_window_on_top_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop));
szr_other->Add(CreateCheckBox(page_general, _("Hide Mouse Cursor"), wxGetTranslation(hide_mouse_cursor_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor));
szr_other->Add(render_to_main_checkbox = CreateCheckBox(page_general, _("Render to Main Window"), wxGetTranslation(render_to_main_win_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain));
szr_other->Add(CreateCheckBox(page_general, _("Auto adjust Window Size"), wxGetTranslation(auto_window_size_desc), SConfig::GetInstance().bRenderWindowAutoSize));
szr_other->Add(CreateCheckBox(page_general, _("Keep Window on Top"), wxGetTranslation(keep_window_on_top_desc), SConfig::GetInstance().bKeepWindowOnTop));
szr_other->Add(CreateCheckBox(page_general, _("Hide Mouse Cursor"), wxGetTranslation(hide_mouse_cursor_desc), SConfig::GetInstance().bHideCursor));
szr_other->Add(render_to_main_checkbox = CreateCheckBox(page_general, _("Render to Main Window"), wxGetTranslation(render_to_main_win_desc), SConfig::GetInstance().bRenderToMain));
}
@ -583,9 +582,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
RegisterControl(progressive_scan_checkbox, wxGetTranslation(prog_scan_desc));
progressive_scan_checkbox->Bind(wxEVT_CHECKBOX, &VideoConfigDiag::Event_ProgressiveScan, this);
progressive_scan_checkbox->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive);
progressive_scan_checkbox->SetValue(SConfig::GetInstance().bProgressive);
// A bit strange behavior, but this needs to stay in sync with the main progressive boolean; TODO: Is this still necessary?
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive);
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", SConfig::GetInstance().bProgressive);
szr_misc->Add(progressive_scan_checkbox);
}
@ -624,7 +623,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
void VideoConfigDiag::Event_DisplayResolution(wxCommandEvent &ev)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution =
SConfig::GetInstance().strFullscreenResolution =
WxStrToStr(choice_display_resolution->GetStringSelection());
#if defined(HAVE_XRANDR) && HAVE_XRANDR
main_frame->m_XRRConfig->Update();

View File

@ -21,7 +21,6 @@
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/PostProcessingConfigDiag.h"
#include "DolphinWX/WxUtils.h"
#include "VideoCommon/PostProcessing.h"
@ -103,7 +102,7 @@ protected:
Close();
g_video_backend = new_backend;
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
SConfig::GetInstance().m_strVideoBackend = g_video_backend->GetName();
g_video_backend->ShowConfig(GetParent());
}
@ -123,7 +122,7 @@ protected:
void Event_ProgressiveScan(wxCommandEvent &ev)
{
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", ev.GetInt());
SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive = ev.IsChecked();
SConfig::GetInstance().bProgressive = ev.IsChecked();
ev.Skip();
}

View File

@ -9,7 +9,6 @@
#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/X11Utils.h"
extern char **environ;
@ -112,7 +111,7 @@ XRRConfiguration::~XRRConfiguration()
void XRRConfiguration::Update()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
if (SConfig::GetInstance().strFullscreenResolution == "Auto")
return;
if (!bValid)
@ -134,7 +133,7 @@ void XRRConfiguration::Update()
unsigned int fullWidth, fullHeight;
char *output_name = nullptr;
char auxFlag = '\0';
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
if (SConfig::GetInstance().strFullscreenResolution.find(':') ==
std::string::npos)
{
fullWidth = fb_width;
@ -142,7 +141,7 @@ void XRRConfiguration::Update()
}
else
{
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
sscanf(SConfig::GetInstance().strFullscreenResolution.c_str(),
"%m[^:]: %ux%u%c", &output_name, &fullWidth, &fullHeight, &auxFlag);
}
bool want_interlaced = ('i' == auxFlag);
@ -161,7 +160,7 @@ void XRRConfiguration::Update()
if (!output_name)
{
output_name = strdup(output_info->name);
SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution =
SConfig::GetInstance().strFullscreenResolution =
StringFromFormat("%s: %ux%u", output_info->name, fullWidth, fullHeight);
}
outputInfo = output_info;

View File

@ -15,7 +15,7 @@ bool InputConfig::LoadConfig(bool isGC)
std::string profile[MAX_BBMOTES];
std::string path;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() != "00000000")
if (SConfig::GetInstance().GetUniqueID() != "00000000")
{
std::string type;
if (isGC)
@ -29,7 +29,7 @@ bool InputConfig::LoadConfig(bool isGC)
path = "Profiles/Wiimote/";
}
IniFile game_ini = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
IniFile game_ini = SConfig::GetInstance().LoadGameIni();
IniFile::Section* control_section = game_ini.GetOrCreateSection("Controls");
for (int i = 0; i < 4; i++)

View File

@ -32,9 +32,9 @@ void Init()
#if defined(__LIBUSB__) || defined (_WIN32)
SI_GCAdapter::Init();
#endif
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
VideoBackend::ActivateBackend(SConfig::GetInstance().m_strVideoBackend);
SetEnableAlert(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
SetEnableAlert(SConfig::GetInstance().bUsePanicHandlers);
}
void Shutdown()

View File

@ -155,7 +155,7 @@ void GeometryShaderCache::Init()
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
std::string cache_filename = StringFromFormat("%sdx11-%s-gs.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
SConfig::GetInstance().m_strUniqueID.c_str());
GeometryShaderCacheInserter inserter;
g_gs_disk_cache.OpenAndRead(cache_filename, inserter);

View File

@ -474,7 +474,7 @@ void PixelShaderCache::Init()
SETSTAT(stats.numPixelShadersAlive, 0);
std::string cache_filename = StringFromFormat("%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
SConfig::GetInstance().m_strUniqueID.c_str());
PixelShaderCacheInserter inserter;
g_ps_disk_cache.OpenAndRead(cache_filename, inserter);

View File

@ -888,7 +888,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
const bool windowResized = CheckForResize();
const bool fullscreen = g_ActiveConfig.bFullscreen && !g_ActiveConfig.bBorderlessFullscreen &&
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain;
!SConfig::GetInstance().bRenderToMain;
bool xfbchanged = s_last_xfb_mode != g_ActiveConfig.bUseRealXFB;

View File

@ -149,7 +149,7 @@ void VertexShaderCache::Init()
SETSTAT(stats.numVertexShadersAlive, 0);
std::string cache_filename = StringFromFormat("%sdx11-%s-vs.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
SConfig::GetInstance().m_strUniqueID.c_str());
VertexShaderCacheInserter inserter;
g_vs_disk_cache.OpenAndRead(cache_filename, inserter);

Some files were not shown because too many files have changed in this diff Show More