Revert "Audit uses of IsRunning and GetState"

This reverts commit 72cf2bdb87.

SYSCONF settings are getting cleared when they shouldn't be. Let's
revert the change until I get proper time to figure out why it's broken.
This commit is contained in:
JosJuice committed 2024-06-26 20:36:46 +02:00
1 parent 3dbaf38eae
commit bc67fc97c3
32 files changed
+100 -131

No files matched your search

@@ -33,7 +33,7 @@ namespace ConfigLoaders
{
void SaveToSYSCONF(Config::LayerType layer, std::function<bool(const Config::Location&)> predicate)
{
if (!Core::IsUninitialized(Core::System::GetInstance()))
if (Core::IsRunning(Core::System::GetInstance()))
return;
IOS::HLE::Kernel ios;
@@ -183,7 +183,7 @@ public:
private:
void LoadFromSYSCONF(Config::Layer* layer)
{
if (!Core::IsUninitialized(Core::System::GetInstance()))
if (Core::IsRunning(Core::System::GetInstance()))
return;
IOS::HLE::Kernel ios;
+1 -6
View File
@@ -211,11 +211,6 @@ bool IsRunningOrStarting(Core::System& system)
return state == State::Running || state == State::Starting;
}
bool IsUninitialized(Core::System& system)
{
return s_state.load() == State::Uninitialized;
}
bool IsCPUThread()
{
return tls_is_cpu_thread;
@@ -242,7 +237,7 @@ bool Init(Core::System& system, std::unique_ptr<BootParameters> boot, const Wind
{
if (s_emu_thread.joinable())
{
if (!IsUninitialized(system))
if (IsRunning(system))
{
PanicAlertFmtT("Emu Thread already running");
return false;
-5
View File
@@ -134,13 +134,8 @@ void UndeclareAsHostThread();
std::string StopMessage(bool main_thread, std::string_view message);
// Returns true when GetState returns Running or Paused.
bool IsRunning(Core::System& system);
// Returns true when GetState returns Starting, Running or Paused.
bool IsRunningOrStarting(Core::System& system);
// Returns true when GetState returns Uninitialized.
bool IsUninitialized(Core::System& system);
bool IsCPUThread(); // this tells us whether we are the CPU thread.
bool IsGPUThread();
bool IsHostThread();