summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MenuBar.cpp
diff options
context:
space:
mode:
authorTechjar <tecknojar@gmail.com>2018-11-23 05:02:00 -0500
committerTechjar <tecknojar@gmail.com>2018-11-29 07:31:45 -0500
commit577f6a5fb1174abfa75ecd2488696bc8eead8aae (patch)
treeb4867b2abb5b50bfb7e8e1ad91452509791f9581 /Source/Core/DolphinQt/MenuBar.cpp
parent1805f51d798113fa839a8f3179360a6e4670c92f (diff)
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.
Diffstat (limited to 'Source/Core/DolphinQt/MenuBar.cpp')
-rw-r--r--Source/Core/DolphinQt/MenuBar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp
index 6b3e88e930..1c67569af6 100644
--- a/Source/Core/DolphinQt/MenuBar.cpp
+++ b/Source/Core/DolphinQt/MenuBar.cpp
@@ -32,6 +32,7 @@
#include "Core/IOS/IOS.h"
#include "Core/IOS/USB/Bluetooth/BTEmu.h"
#include "Core/Movie.h"
+#include "Core/NetPlayProto.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PPCAnalyst.h"
@@ -106,6 +107,9 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
m_recording_stop->setEnabled(false);
m_recording_play->setEnabled(!running);
+ // Options
+ m_controllers_action->setEnabled(NetPlay::IsNetPlayRunning() ? !running : true);
+
// Tools
m_show_cheat_manager->setEnabled(Settings::Instance().GetCheatsEnabled() && running);
@@ -471,7 +475,8 @@ void MenuBar::AddOptionsMenu()
options_menu->addSeparator();
options_menu->addAction(tr("&Graphics Settings"), this, &MenuBar::ConfigureGraphics);
options_menu->addAction(tr("&Audio Settings"), this, &MenuBar::ConfigureAudio);
- options_menu->addAction(tr("&Controller Settings"), this, &MenuBar::ConfigureControllers);
+ m_controllers_action =
+ options_menu->addAction(tr("&Controller Settings"), this, &MenuBar::ConfigureControllers);
options_menu->addAction(tr("&Hotkey Settings"), this, &MenuBar::ConfigureHotkeys);
options_menu->addSeparator();