Merge pull request #2594 from degasus/master

Options: merge SCoreStartupParameter into SConfig
This commit is contained in:
Markus Wick
2015-06-12 22:42:45 +02:00
116 changed files with 1232 additions and 1305 deletions
+2 -2
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;
+1 -1
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);
+5 -5
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)
{
+12 -14
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);
+3 -3
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)
+4 -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)
-1
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
File diff suppressed because it is too large Load Diff
+146 -2
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;
+11 -17
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;
-2
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" />
-2
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" />
-452
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;
}
-273
View File
@@ -1,273 +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 Hotkey
{
HK_OPEN,
HK_CHANGE_DISC,
HK_REFRESH_LIST,
HK_PLAY_PAUSE,
HK_STOP,
HK_RESET,
HK_FRAME_ADVANCE,
HK_START_RECORDING,
HK_PLAY_RECORDING,
HK_EXPORT_RECORDING,
HK_READ_ONLY_MODE,
HK_FULLSCREEN,
HK_SCREENSHOT,
HK_EXIT,
HK_WIIMOTE1_CONNECT,
HK_WIIMOTE2_CONNECT,
HK_WIIMOTE3_CONNECT,
HK_WIIMOTE4_CONNECT,
HK_BALANCEBOARD_CONNECT,
HK_VOLUME_DOWN,
HK_VOLUME_UP,
HK_VOLUME_TOGGLE_MUTE,
HK_INCREASE_IR,
HK_DECREASE_IR,
HK_TOGGLE_IR,
HK_TOGGLE_AR,
HK_TOGGLE_EFBCOPIES,
HK_TOGGLE_FOG,
HK_TOGGLE_THROTTLE,
HK_DECREASE_FRAME_LIMIT,
HK_INCREASE_FRAME_LIMIT,
HK_FREELOOK_DECREASE_SPEED,
HK_FREELOOK_INCREASE_SPEED,
HK_FREELOOK_RESET_SPEED,
HK_FREELOOK_UP,
HK_FREELOOK_DOWN,
HK_FREELOOK_LEFT,
HK_FREELOOK_RIGHT,
HK_FREELOOK_ZOOM_IN,
HK_FREELOOK_ZOOM_OUT,
HK_FREELOOK_RESET,
HK_DECREASE_DEPTH,
HK_INCREASE_DEPTH,
HK_DECREASE_CONVERGENCE,
HK_INCREASE_CONVERGENCE,
HK_LOAD_STATE_SLOT_1,
HK_LOAD_STATE_SLOT_2,
HK_LOAD_STATE_SLOT_3,
HK_LOAD_STATE_SLOT_4,
HK_LOAD_STATE_SLOT_5,
HK_LOAD_STATE_SLOT_6,
HK_LOAD_STATE_SLOT_7,
HK_LOAD_STATE_SLOT_8,
HK_LOAD_STATE_SLOT_9,
HK_LOAD_STATE_SLOT_10,
HK_SAVE_STATE_SLOT_1,
HK_SAVE_STATE_SLOT_2,
HK_SAVE_STATE_SLOT_3,
HK_SAVE_STATE_SLOT_4,
HK_SAVE_STATE_SLOT_5,
HK_SAVE_STATE_SLOT_6,
HK_SAVE_STATE_SLOT_7,
HK_SAVE_STATE_SLOT_8,
HK_SAVE_STATE_SLOT_9,
HK_SAVE_STATE_SLOT_10,
HK_SELECT_STATE_SLOT_1,
HK_SELECT_STATE_SLOT_2,
HK_SELECT_STATE_SLOT_3,
HK_SELECT_STATE_SLOT_4,
HK_SELECT_STATE_SLOT_5,
HK_SELECT_STATE_SLOT_6,
HK_SELECT_STATE_SLOT_7,
HK_SELECT_STATE_SLOT_8,
HK_SELECT_STATE_SLOT_9,
HK_SELECT_STATE_SLOT_10,
HK_SAVE_STATE_SLOT_SELECTED,
HK_LOAD_STATE_SLOT_SELECTED,
HK_LOAD_LAST_STATE_1,
HK_LOAD_LAST_STATE_2,
HK_LOAD_LAST_STATE_3,
HK_LOAD_LAST_STATE_4,
HK_LOAD_LAST_STATE_5,
HK_LOAD_LAST_STATE_6,
HK_LOAD_LAST_STATE_7,
HK_LOAD_LAST_STATE_8,
HK_LOAD_LAST_STATE_9,
HK_LOAD_LAST_STATE_10,
HK_SAVE_FIRST_STATE,
HK_UNDO_LOAD_STATE,
HK_UNDO_SAVE_STATE,
HK_SAVE_STATE_FILE,
HK_LOAD_STATE_FILE,
NUM_HOTKEYS,
};
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);
};
+1 -1
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
+1 -1
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;
+1 -1
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)
+1 -1
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)
{
+2 -2
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();
+2 -2
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;

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