Qt/NetworkWidget: Don't update if not paused.

This is similar to https://github.com/dolphin-emu/dolphin/pull/11623 where the Core state change invoked by the CPUThreadGuard does indirectly cause another Update() call.
This commit is contained in:
Admiral H. Curtiss 2023-04-23 21:48:13 +02:00
parent ffbbd72741
commit 8a6118bec6
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 10 additions and 0 deletions

View File

@ -239,6 +239,16 @@ void NetworkWidget::Update()
if (!isVisible())
return;
if (Core::GetState() != Core::State::Paused)
{
m_socket_table->setDisabled(true);
m_ssl_table->setDisabled(true);
return;
}
m_socket_table->setDisabled(false);
m_ssl_table->setDisabled(false);
// needed because there's a race condition on the IOS instance otherwise
Core::CPUThreadGuard guard(Core::System::GetInstance());