Qt: Disable controller configuration while NetPlay is running

Doing pretty much anything in the controller config breaks NetPlay
(desync and/or deadlock), as saving the settings reconfigures
controller interfaces, which NetPlay doesn't expect.
This commit is contained in:
Techjar
2018-11-23 05:02:00 -05:00
parent 1805f51d79
commit 577f6a5fb1
4 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include <QIcon>
#include "Core/Core.h"
#include "Core/NetPlayProto.h"
#include "DolphinQt/Host.h"
#include "DolphinQt/Resources.h"
#include "DolphinQt/Settings.h"
@ -54,6 +55,7 @@ void ToolBar::OnEmulationStateChanged(Core::State state)
m_stop_action->setEnabled(running);
m_fullscreen_action->setEnabled(running);
m_screenshot_action->setEnabled(running);
m_controllers_action->setEnabled(NetPlay::IsNetPlayRunning() ? !running : true);
bool playing = running && state != Core::State::Paused;
UpdatePausePlayButtonState(playing);