Added a game specific property to disable the speaker on real Wiimotes.
Fixes issue 4185. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7559 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fa7a521086
commit
a9f7a0c284
|
@ -54,7 +54,7 @@ namespace BootManager
|
||||||
struct ConfigCache
|
struct ConfigCache
|
||||||
{
|
{
|
||||||
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
|
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
|
||||||
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE;
|
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker;
|
||||||
int iTLBHack;
|
int iTLBHack;
|
||||||
};
|
};
|
||||||
static ConfigCache config_cache;
|
static ConfigCache config_cache;
|
||||||
|
@ -98,6 +98,7 @@ bool BootCore(const std::string& _rFilename)
|
||||||
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
|
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
|
||||||
config_cache.bMergeBlocks = StartUp.bMergeBlocks;
|
config_cache.bMergeBlocks = StartUp.bMergeBlocks;
|
||||||
config_cache.bDSPHLE = StartUp.bDSPHLE;
|
config_cache.bDSPHLE = StartUp.bDSPHLE;
|
||||||
|
config_cache.bDisableWiimoteSpeaker = StartUp.bDisableWiimoteSpeaker;
|
||||||
|
|
||||||
// General settings
|
// General settings
|
||||||
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||||
|
@ -110,6 +111,7 @@ bool BootCore(const std::string& _rFilename)
|
||||||
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
|
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
|
||||||
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
|
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
|
||||||
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
|
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
|
||||||
|
game_ini.Get("Wii", "DisableWiimoteSpeaker",&StartUp.bDisableWiimoteSpeaker, StartUp.bDisableWiimoteSpeaker);
|
||||||
|
|
||||||
// Wii settings
|
// Wii settings
|
||||||
if (StartUp.bWii)
|
if (StartUp.bWii)
|
||||||
|
@ -149,6 +151,7 @@ void Stop()
|
||||||
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
|
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
|
||||||
StartUp.bMergeBlocks = config_cache.bMergeBlocks;
|
StartUp.bMergeBlocks = config_cache.bMergeBlocks;
|
||||||
StartUp.bDSPHLE = config_cache.bDSPHLE;
|
StartUp.bDSPHLE = config_cache.bDSPHLE;
|
||||||
|
StartUp.bDisableWiimoteSpeaker = config_cache.bDisableWiimoteSpeaker;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
||||||
iRenderWindowWidth(640), iRenderWindowHeight(480),
|
iRenderWindowWidth(640), iRenderWindowHeight(480),
|
||||||
bRenderWindowAutoSize(false),
|
bRenderWindowAutoSize(false),
|
||||||
bFullscreen(false), bRenderToMain(false),
|
bFullscreen(false), bRenderToMain(false),
|
||||||
bProgressive(false),
|
bProgressive(false), bDisableWiimoteSpeaker(false),
|
||||||
iTheme(0),
|
iTheme(0),
|
||||||
iPosX(100), iPosY(100), iWidth(800), iHeight(600)
|
iPosX(100), iPosY(100), iWidth(800), iHeight(600)
|
||||||
{
|
{
|
||||||
|
@ -100,6 +100,8 @@ void SCoreStartupParameter::LoadDefaults()
|
||||||
bJITPairedOff = false;
|
bJITPairedOff = false;
|
||||||
bJITSystemRegistersOff = false;
|
bJITSystemRegistersOff = false;
|
||||||
|
|
||||||
|
bDisableWiimoteSpeaker = false;
|
||||||
|
|
||||||
m_strName = "NONE";
|
m_strName = "NONE";
|
||||||
m_strUniqueID = "00000000";
|
m_strUniqueID = "00000000";
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@ struct SCoreStartupParameter
|
||||||
int SelectedLanguage;
|
int SelectedLanguage;
|
||||||
|
|
||||||
bool bWii;
|
bool bWii;
|
||||||
|
bool bDisableWiimoteSpeaker;
|
||||||
|
|
||||||
// Interface settings
|
// Interface settings
|
||||||
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;
|
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;
|
||||||
|
|
|
@ -190,7 +190,7 @@ bool Wiimote::Write()
|
||||||
Report rpt;
|
Report rpt;
|
||||||
bool audio_written = false;
|
bool audio_written = false;
|
||||||
|
|
||||||
if (m_audio_reports.Pop(rpt))
|
if (m_audio_reports.Pop(rpt) && !Core::g_CoreStartupParameter.bDisableWiimoteSpeaker)
|
||||||
{
|
{
|
||||||
IOWrite(rpt.first, rpt.second);
|
IOWrite(rpt.first, rpt.second);
|
||||||
delete[] rpt.first;
|
delete[] rpt.first;
|
||||||
|
|
|
@ -321,6 +321,9 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
// Wii Console
|
// Wii Console
|
||||||
EnableProgressiveScan = new wxCheckBox(m_GameConfig, ID_ENABLEPROGRESSIVESCAN, _("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
EnableProgressiveScan = new wxCheckBox(m_GameConfig, ID_ENABLEPROGRESSIVESCAN, _("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("Enable WideScreen"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("Enable WideScreen"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
|
DisableWiimoteSpeaker = new wxCheckBox(m_GameConfig, ID_DISABLEWIIMOTESPEAKER, _("Disable Wiimote Speaker"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
|
DisableWiimoteSpeaker->SetToolTip(_("Mutes the Wiimote speaker. Fixes random disconnections on real wiimotes. No effect on emulated wiimotes."));
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
UseZTPSpeedupHack = new wxCheckBox(m_GameConfig, ID_ZTP_SPEEDUP, _("ZTP hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER);
|
UseZTPSpeedupHack = new wxCheckBox(m_GameConfig, ID_ZTP_SPEEDUP, _("ZTP hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER);
|
||||||
UseZTPSpeedupHack->SetToolTip(_("Enable this to speed up The Legend of Zelda: Twilight Princess. Disable for ANY other game."));
|
UseZTPSpeedupHack->SetToolTip(_("Enable this to speed up The Legend of Zelda: Twilight Princess. Disable for ANY other game."));
|
||||||
|
@ -365,6 +368,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sbWiiOverrides->ShowItems(false);
|
sbWiiOverrides->ShowItems(false);
|
||||||
EnableProgressiveScan->Hide();
|
EnableProgressiveScan->Hide();
|
||||||
EnableWideScreen->Hide();
|
EnableWideScreen->Hide();
|
||||||
|
DisableWiimoteSpeaker->Hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -375,6 +379,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
}
|
}
|
||||||
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxLEFT, 5);
|
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxLEFT, 5);
|
||||||
sbWiiOverrides->Add(EnableWideScreen, 0, wxLEFT, 5);
|
sbWiiOverrides->Add(EnableWideScreen, 0, wxLEFT, 5);
|
||||||
|
sbWiiOverrides->Add(DisableWiimoteSpeaker, 0, wxLEFT, 5);
|
||||||
|
|
||||||
wxStaticBoxSizer * const sbVideoOverrides =
|
wxStaticBoxSizer * const sbVideoOverrides =
|
||||||
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
|
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
|
||||||
|
@ -889,6 +894,11 @@ void CISOProperties::LoadGameConfig()
|
||||||
else
|
else
|
||||||
EnableWideScreen->Set3StateValue(wxCHK_UNDETERMINED);
|
EnableWideScreen->Set3StateValue(wxCHK_UNDETERMINED);
|
||||||
|
|
||||||
|
if (GameIni.Get("Wii", "DisableWiimoteSpeaker", &bTemp))
|
||||||
|
DisableWiimoteSpeaker->Set3StateValue((wxCheckBoxState)bTemp);
|
||||||
|
else
|
||||||
|
DisableWiimoteSpeaker->Set3StateValue(wxCHK_UNDETERMINED);
|
||||||
|
|
||||||
if (GameIni.Get("Video", "ZTPSpeedupHack", &bTemp))
|
if (GameIni.Get("Video", "ZTPSpeedupHack", &bTemp))
|
||||||
UseZTPSpeedupHack->Set3StateValue((wxCheckBoxState)bTemp);
|
UseZTPSpeedupHack->Set3StateValue((wxCheckBoxState)bTemp);
|
||||||
else
|
else
|
||||||
|
@ -977,6 +987,11 @@ bool CISOProperties::SaveGameConfig()
|
||||||
else
|
else
|
||||||
GameIni.Set("Wii", "Widescreen", EnableWideScreen->Get3StateValue());
|
GameIni.Set("Wii", "Widescreen", EnableWideScreen->Get3StateValue());
|
||||||
|
|
||||||
|
if (DisableWiimoteSpeaker->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||||
|
GameIni.DeleteKey("Wii", "DisableWiimoteSpeaker");
|
||||||
|
else
|
||||||
|
GameIni.Set("Wii", "DisableWiimoteSpeaker", DisableWiimoteSpeaker->Get3StateValue());
|
||||||
|
|
||||||
if (UseZTPSpeedupHack->Get3StateValue() == wxCHK_UNDETERMINED)
|
if (UseZTPSpeedupHack->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||||
GameIni.DeleteKey("Video", "ZTPSpeedupHack");
|
GameIni.DeleteKey("Video", "ZTPSpeedupHack");
|
||||||
else
|
else
|
||||||
|
|
|
@ -72,7 +72,7 @@ private:
|
||||||
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
|
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
|
||||||
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
|
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
|
||||||
// Wii
|
// Wii
|
||||||
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
wxCheckBox *EnableProgressiveScan, *EnableWideScreen, *DisableWiimoteSpeaker;
|
||||||
// Video
|
// Video
|
||||||
wxCheckBox *UseZTPSpeedupHack, *PHackEnable;
|
wxCheckBox *UseZTPSpeedupHack, *PHackEnable;
|
||||||
wxButton *PHSettings;
|
wxButton *PHSettings;
|
||||||
|
@ -138,6 +138,7 @@ private:
|
||||||
ID_PHSETTINGS,
|
ID_PHSETTINGS,
|
||||||
ID_ENABLEPROGRESSIVESCAN,
|
ID_ENABLEPROGRESSIVESCAN,
|
||||||
ID_ENABLEWIDESCREEN,
|
ID_ENABLEWIDESCREEN,
|
||||||
|
ID_DISABLEWIIMOTESPEAKER,
|
||||||
ID_EDITCONFIG,
|
ID_EDITCONFIG,
|
||||||
ID_EMUSTATE,
|
ID_EMUSTATE,
|
||||||
ID_EMU_ISSUES,
|
ID_EMU_ISSUES,
|
||||||
|
|
Loading…
Reference in New Issue