Added an option to disable the Wiimote speaker. The checkbox has 3 states:
Ticked = Clear sound but a bit unresponsive to controls Filled = Same as r7225 Clear = Disable speaker The option is in the Wii tab of the configuration. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7231 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
996ff62ad6
commit
9680d3ac95
|
@ -222,6 +222,7 @@ void SConfig::SaveSettings()
|
|||
|
||||
ini.Set("Core", "WiiSDCard", m_WiiSDCard);
|
||||
ini.Set("Core", "WiiKeyboard", m_WiiKeyboard);
|
||||
ini.Set("Core", "WiimoteSpeaker", m_WiimoteSpeaker);
|
||||
ini.Set("Core", "WiimoteReconnectOnLoad", m_WiimoteReconnectOnLoad);
|
||||
ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
||||
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
||||
|
@ -349,7 +350,8 @@ void SConfig::LoadSettings()
|
|||
|
||||
ini.Get("Core", "WiiSDCard", &m_WiiSDCard, false);
|
||||
ini.Get("Core", "WiiKeyboard", &m_WiiKeyboard, false);
|
||||
ini.Get("Core", "WiimoteReconnectOnLoad", &m_WiimoteReconnectOnLoad, true);
|
||||
ini.Get("Core", "WiimoteSpeaker", &m_WiimoteSpeaker, false);
|
||||
ini.Get("Core", "WiimoteReconnectOnLoad", &m_WiimoteReconnectOnLoad, true);
|
||||
ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
||||
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
||||
ini.Get("Core", "MMU", &m_LocalCoreStartupParameter.bMMU, false);
|
||||
|
|
|
@ -33,6 +33,7 @@ struct SConfig : NonCopyable
|
|||
bool m_WiiKeyboard;
|
||||
bool m_WiiAutoReconnect[4];
|
||||
bool m_WiiAutoUnpair;
|
||||
int m_WiimoteSpeaker;
|
||||
bool m_WiimoteReconnectOnLoad;
|
||||
|
||||
// name of the last used filename
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "../HW/Memmap.h"
|
||||
#include "../Host.h"
|
||||
#include "CoreTiming.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
namespace HLE_Misc
|
||||
{
|
||||
|
@ -288,21 +289,32 @@ u8 isBusyPoll = 0;
|
|||
// Hack: Wiimotes are never too busy to process speaker data
|
||||
void IsBusyStream()
|
||||
{
|
||||
isBusyPoll++;
|
||||
|
||||
// Signal that the wiimote is idle for a few cycles, allowing sound
|
||||
// to be processed.
|
||||
if (isBusyPoll < 5)
|
||||
if (SConfig::GetInstance().m_WiimoteSpeaker == 1)
|
||||
{
|
||||
// Wiimote is idle
|
||||
GPR(3) = 0;
|
||||
}
|
||||
else if (SConfig::GetInstance().m_WiimoteSpeaker == 2)
|
||||
{
|
||||
isBusyPoll++;
|
||||
|
||||
// Signal that the wiimote is idle for a few cycles, allowing sound
|
||||
// to be processed.
|
||||
if (isBusyPoll < 5)
|
||||
{
|
||||
// Wiimote is idle
|
||||
GPR(3) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wiimote is busy
|
||||
GPR(3) = 1;
|
||||
if (isBusyPoll >= 8)
|
||||
isBusyPoll = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wiimote is busy
|
||||
GPR(3) = 1;
|
||||
if (isBusyPoll >= 8)
|
||||
isBusyPoll = 0;
|
||||
}
|
||||
NPC = LR;
|
||||
}
|
||||
|
|
|
@ -164,6 +164,7 @@ EVT_CHOICE(ID_WII_IPL_LNG, CConfigMain::WiiSettingsChanged)
|
|||
|
||||
EVT_CHECKBOX(ID_WII_SD_CARD, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHECKBOX(ID_WII_KEYBOARD, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHECKBOX(ID_WII_WIIMOTE_SPEAKER, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHECKBOX(ID_WII_WIIMOTE_RECONNECT, CConfigMain::WiiSettingsChanged)
|
||||
|
||||
|
||||
|
@ -503,6 +504,12 @@ void CConfigMain::InitializeGUIValues()
|
|||
WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
|
||||
WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData<u32>("BT.SENS"));
|
||||
WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData<bool>("BT.MOT"));
|
||||
if (SConfig::GetInstance().m_WiimoteSpeaker == 1)
|
||||
WiimoteSpeaker->Set3StateValue(wxCHK_CHECKED);
|
||||
else if (SConfig::GetInstance().m_WiimoteSpeaker == 2)
|
||||
WiimoteSpeaker->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
else
|
||||
WiimoteSpeaker->Set3StateValue(wxCHK_UNCHECKED);
|
||||
WiimoteReconnectOnLoad->SetValue(SConfig::GetInstance().m_WiimoteReconnectOnLoad);
|
||||
|
||||
// Wii - Misc
|
||||
|
@ -825,6 +832,7 @@ void CConfigMain::CreateGUIControls()
|
|||
WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator);
|
||||
WiiSensBarSens = new wxSlider(WiiPage, ID_WII_BT_SENS, 0, 0, 4);
|
||||
WiimoteMotor = new wxCheckBox(WiiPage, ID_WII_BT_MOT, _("Wiimote Motor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
WiimoteSpeaker = new wxCheckBox(WiiPage, ID_WII_WIIMOTE_SPEAKER, _("Wiimote Speaker"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
WiimoteReconnectOnLoad = new wxCheckBox(WiiPage, ID_WII_WIIMOTE_RECONNECT, _("Reconnect Wiimote On Load State"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Misc Settings
|
||||
|
@ -846,7 +854,8 @@ void CConfigMain::CreateGUIControls()
|
|||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sWiimoteSettings->Add(WiiSensBarSens, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND|wxALL, 5);
|
||||
sWiimoteSettings->Add(WiimoteMotor, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sWiimoteSettings->Add(WiimoteReconnectOnLoad, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sWiimoteSettings->Add(WiimoteSpeaker, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sWiimoteSettings->Add(WiimoteReconnectOnLoad, wxGBPosition(4, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sbWiimoteSettings = new wxStaticBoxSizer(wxHORIZONTAL, WiiPage, _("Wiimote Settings"));
|
||||
sbWiimoteSettings->Add(sWiimoteSettings);
|
||||
|
||||
|
@ -1267,6 +1276,14 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
|
|||
case ID_WII_BT_MOT:
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", WiimoteMotor->IsChecked());
|
||||
break;
|
||||
case ID_WII_WIIMOTE_SPEAKER:
|
||||
if (WiimoteSpeaker->Get3StateValue() == wxCHK_CHECKED)
|
||||
SConfig::GetInstance().m_WiimoteSpeaker = 1;
|
||||
else if (WiimoteSpeaker->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
SConfig::GetInstance().m_WiimoteSpeaker = 2;
|
||||
else
|
||||
SConfig::GetInstance().m_WiimoteSpeaker = 0;
|
||||
break;
|
||||
case ID_WII_WIIMOTE_RECONNECT:
|
||||
SConfig::GetInstance().m_WiimoteReconnectOnLoad = WiimoteReconnectOnLoad->IsChecked();
|
||||
break;
|
||||
|
|
|
@ -117,6 +117,7 @@ private:
|
|||
ID_WII_BT_BAR,
|
||||
ID_WII_BT_SENS,
|
||||
ID_WII_BT_MOT,
|
||||
ID_WII_WIIMOTE_SPEAKER,
|
||||
ID_WII_WIIMOTE_RECONNECT,
|
||||
|
||||
ID_WII_IPL_SSV,
|
||||
|
@ -219,6 +220,7 @@ private:
|
|||
wxChoice* WiiSensBarPos;
|
||||
wxSlider* WiiSensBarSens;
|
||||
wxCheckBox* WiimoteMotor;
|
||||
wxCheckBox* WiimoteSpeaker;
|
||||
wxCheckBox* WiimoteReconnectOnLoad;
|
||||
|
||||
// Misc
|
||||
|
|
Loading…
Reference in New Issue