summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-11-23 21:43:15 -0500
committerLioncash <mathew1800@gmail.com>2014-12-01 03:36:09 -0500
commit896304fd072f42cba0423bbcacb9fe095f014aaa (patch)
tree97c5a4a71dbcf613e22e244787499eabbac9fdc3 /Source
parent7b54d8ad10568d973471d3a025f5791fcf8ba108 (diff)
ControllerConfigDiag: Disable controller type changes if netplay or a movie is active.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/ControllerConfigDiag.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
index b0f6a1615f..9622e9be0b 100644
--- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp
+++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
@@ -23,6 +23,7 @@
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
+#include "Core/Movie.h"
#include "Core/NetPlayProto.h"
#include "Core/HW/GCPad.h"
#include "Core/HW/SI.h"
@@ -96,6 +97,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer()
pad_type_choices[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnGameCubePortChanged, this);
+ // Disable controller type selection for certain circumstances.
+ if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive())
+ pad_type_choices[i]->Disable();
+
// Set the saved pad type as the default choice.
switch (SConfig::GetInstance().m_SIDevice[i])
{
@@ -159,6 +164,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure"));
wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this);
+ // Disable controller type selection for certain circumstances.
+ if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive())
+ wiimote_source_ch[i]->Disable();
+
m_orig_wiimote_sources[i] = g_wiimote_sources[i];
wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]);
if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID)