Migrate SConfig::m_is_mios to System.
This commit is contained in:
parent
e1ec47b504
commit
8d515d407c
|
@ -60,13 +60,13 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
|||
if (!boot)
|
||||
return false;
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
|
||||
if (!StartUp.SetPathsAndGameMetadata(*boot))
|
||||
if (!StartUp.SetPathsAndGameMetadata(system, *boot))
|
||||
return false;
|
||||
|
||||
// Movie settings
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& movie = system.GetMovie();
|
||||
if (movie.IsPlayingInput() && movie.IsConfigSaved())
|
||||
{
|
||||
|
|
|
@ -335,9 +335,9 @@ private:
|
|||
DiscIO::Region* region;
|
||||
};
|
||||
|
||||
bool SConfig::SetPathsAndGameMetadata(const BootParameters& boot)
|
||||
bool SConfig::SetPathsAndGameMetadata(Core::System& system, const BootParameters& boot)
|
||||
{
|
||||
m_is_mios = false;
|
||||
system.SetIsMIOS(false);
|
||||
m_disc_booted_from_game_list = false;
|
||||
if (!std::visit(SetGameMetadata(this, &m_region), boot.parameters))
|
||||
return false;
|
||||
|
|
|
@ -22,7 +22,8 @@ class IniFile;
|
|||
namespace Core
|
||||
{
|
||||
class CPUThreadGuard;
|
||||
}
|
||||
class System;
|
||||
} // namespace Core
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
|
@ -52,7 +53,6 @@ struct SConfig
|
|||
bool bCopyWiiSaveNetplay = true;
|
||||
|
||||
bool bWii = false;
|
||||
bool m_is_mios = false;
|
||||
|
||||
DiscIO::Region m_region;
|
||||
|
||||
|
@ -80,7 +80,7 @@ struct SConfig
|
|||
|
||||
void LoadDefaults();
|
||||
static std::string MakeGameID(std::string_view file_name);
|
||||
bool SetPathsAndGameMetadata(const BootParameters& boot);
|
||||
bool SetPathsAndGameMetadata(Core::System& system, const BootParameters& boot);
|
||||
DiscIO::Language GetCurrentLanguage(bool wii) const;
|
||||
DiscIO::Language GetLanguageAdjustedForRegion(bool wii, DiscIO::Region region) const;
|
||||
std::string GetGameTDBImageRegionCode(bool wii, DiscIO::Region region) const;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "Common/Config/Config.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/GeckoCode.h"
|
||||
#include "Core/HLE/HLE_Misc.h"
|
||||
|
@ -85,7 +84,7 @@ void PatchFixedFunctions(Core::System& system)
|
|||
// that get patched by MIOS. See https://bugs.dolphin-emu.org/issues/11952 for more info.
|
||||
// Not applying the Gecko HLE patches means that Gecko codes will not work under MIOS,
|
||||
// but this is better than the alternative of having specific games crash.
|
||||
if (SConfig::GetInstance().m_is_mios)
|
||||
if (system.IsMIOS())
|
||||
return;
|
||||
|
||||
// HLE jump to loader (homebrew). Disabled when Gecko is active as it interferes with the code
|
||||
|
|
|
@ -101,7 +101,7 @@ bool Load(Core::System& system)
|
|||
|
||||
memory.Write_U32(0x00000000, ADDRESS_INIT_SEMAPHORE);
|
||||
NOTICE_LOG_FMT(IOS, "IPL ready.");
|
||||
SConfig::GetInstance().m_is_mios = true;
|
||||
system.SetIsMIOS(true);
|
||||
system.GetDVDInterface().UpdateRunningGameMetadata();
|
||||
SConfig::OnNewTitleLoad(guard);
|
||||
return true;
|
||||
|
|
|
@ -139,7 +139,9 @@ void EnableCompression(bool compression)
|
|||
|
||||
static void DoState(PointerWrap& p)
|
||||
{
|
||||
bool is_wii = SConfig::GetInstance().bWii || SConfig::GetInstance().m_is_mios;
|
||||
auto& system = Core::System::GetInstance();
|
||||
|
||||
bool is_wii = SConfig::GetInstance().bWii || system.IsMIOS();
|
||||
const bool is_wii_currently = is_wii;
|
||||
p.Do(is_wii);
|
||||
if (is_wii != is_wii_currently)
|
||||
|
@ -152,7 +154,6 @@ static void DoState(PointerWrap& p)
|
|||
}
|
||||
|
||||
// Check to make sure the emulated memory sizes are the same as the savestate
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
u32 state_mem1_size = memory.GetRamSizeReal();
|
||||
u32 state_mem2_size = memory.GetExRamSizeReal();
|
||||
|
|
|
@ -135,6 +135,9 @@ public:
|
|||
bool IsDualCoreMode() const { return m_separate_cpu_and_gpu_threads; }
|
||||
bool IsMMUMode() const { return m_mmu_enabled; }
|
||||
bool IsPauseOnPanicMode() const { return m_pause_on_panic_enabled; }
|
||||
bool IsMIOS() const { return m_is_mios; }
|
||||
|
||||
void SetIsMIOS(bool is_mios) { m_is_mios = is_mios; }
|
||||
|
||||
SoundStream* GetSoundStream() const;
|
||||
void SetSoundStream(std::unique_ptr<SoundStream> sound_stream);
|
||||
|
@ -188,5 +191,6 @@ private:
|
|||
bool m_separate_cpu_and_gpu_threads = false;
|
||||
bool m_mmu_enabled = false;
|
||||
bool m_pause_on_panic_enabled = false;
|
||||
bool m_is_mios = false;
|
||||
};
|
||||
} // namespace Core
|
||||
|
|
Loading…
Reference in New Issue