Merge pull request #12695 from mitaclaw/core-global-system-4

Core::IsRunning: Avoid Global System Accessor
This commit is contained in:
Admiral H. Curtiss
2024-05-04 05:15:35 +02:00
committed by GitHub
25 changed files with 90 additions and 74 deletions

View File

@ -629,7 +629,7 @@ QByteArray MemoryWidget::GetInputData() const
void MemoryWidget::OnSetValue()
{
if (!Core::IsRunning())
if (!Core::IsRunning(m_system))
return;
auto target_addr = GetTargetAddress();
@ -675,7 +675,7 @@ void MemoryWidget::OnSetValue()
void MemoryWidget::OnSetValueFromFile()
{
if (!Core::IsRunning())
if (!Core::IsRunning(m_system))
return;
auto target_addr = GetTargetAddress();

View File

@ -143,7 +143,7 @@ void WatchWidget::UpdateButtonsEnabled()
if (!isVisible())
return;
const bool is_enabled = Core::IsRunning();
const bool is_enabled = Core::IsRunning(m_system);
m_new->setEnabled(is_enabled);
m_delete->setEnabled(is_enabled);
m_clear->setEnabled(is_enabled);
@ -195,10 +195,10 @@ void WatchWidget::Update()
QBrush brush = QPalette().brush(QPalette::Text);
if (!Core::IsRunning() || !PowerPC::MMU::HostIsRAMAddress(guard, entry.address))
if (!Core::IsRunning(m_system) || !PowerPC::MMU::HostIsRAMAddress(guard, entry.address))
brush.setColor(Qt::red);
if (Core::IsRunning())
if (Core::IsRunning(m_system))
{
if (PowerPC::MMU::HostIsRAMAddress(guard, entry.address))
{