Skip to content

Commit

Permalink
ControllerConfigDiag: Disable controller type changes if netplay or a…
Browse files Browse the repository at this point in the history
… movie is active.
  • Loading branch information
lioncash committed Dec 1, 2014
1 parent 7b54d8a commit 896304f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Core/DolphinWX/ControllerConfigDiag.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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])
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 896304f

Please sign in to comment.