FifoPlayer: Move instance to System.

This commit is contained in:
Admiral H. Curtiss
2024-01-05 09:31:59 +01:00
parent 2f7f7afe6d
commit fc2ec826d4
13 changed files with 76 additions and 56 deletions

View File

@ -466,7 +466,7 @@ static void FifoPlayerThread(Core::System& system, const std::optional<std::stri
Common::SetCurrentThreadName("FIFO-GPU thread");
// Enter CPU run loop. When we leave it - we are done.
if (auto cpu_core = FifoPlayer::GetInstance().GetCPUCore())
if (auto cpu_core = system.GetFifoPlayer().GetCPUCore())
{
system.GetPowerPC().InjectExternalCPUCore(cpu_core.get());
s_is_started = true;
@ -476,13 +476,13 @@ static void FifoPlayerThread(Core::System& system, const std::optional<std::stri
s_is_started = false;
system.GetPowerPC().InjectExternalCPUCore(nullptr);
FifoPlayer::GetInstance().Close();
system.GetFifoPlayer().Close();
}
else
{
// FIFO log does not contain any frames, cannot continue.
PanicAlertFmt("FIFO file is invalid, cannot playback.");
FifoPlayer::GetInstance().Close();
system.GetFifoPlayer().Close();
return;
}
}