mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
ControllerConfigDiag: Disable controller type changes if netplay or a movie is active.
This commit is contained in:
@ -23,6 +23,7 @@
|
|||||||
#include "Common/SysConf.h"
|
#include "Common/SysConf.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
|
#include "Core/Movie.h"
|
||||||
#include "Core/NetPlayProto.h"
|
#include "Core/NetPlayProto.h"
|
||||||
#include "Core/HW/GCPad.h"
|
#include "Core/HW/GCPad.h"
|
||||||
#include "Core/HW/SI.h"
|
#include "Core/HW/SI.h"
|
||||||
@ -96,6 +97,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer()
|
|||||||
|
|
||||||
pad_type_choices[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnGameCubePortChanged, this);
|
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.
|
// Set the saved pad type as the default choice.
|
||||||
switch (SConfig::GetInstance().m_SIDevice[i])
|
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] = new wxButton(this, config_bt_id, _("Configure"));
|
||||||
wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this);
|
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];
|
m_orig_wiimote_sources[i] = g_wiimote_sources[i];
|
||||||
wiimote_source_ch[i]->Select(m_orig_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)
|
if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID)
|
||||||
|
Reference in New Issue
Block a user