ControllerConfigDiag: Disable controller type changes if netplay or a movie is active.

This commit is contained in:
Lioncash 2014-11-23 21:43:15 -05:00
parent 7b54d8ad10
commit 896304fd07
1 changed files with 9 additions and 0 deletions

View File

@ -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)