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
|
||||
{
|
||||
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
|
||||
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE;
|
||||
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker;
|
||||
int iTLBHack;
|
||||
};
|
||||
static ConfigCache config_cache;
|
||||
|
@ -98,6 +98,7 @@ bool BootCore(const std::string& _rFilename)
|
|||
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
|
||||
config_cache.bMergeBlocks = StartUp.bMergeBlocks;
|
||||
config_cache.bDSPHLE = StartUp.bDSPHLE;
|
||||
config_cache.bDisableWiimoteSpeaker = StartUp.bDisableWiimoteSpeaker;
|
||||
|
||||
// General settings
|
||||
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", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
|
||||
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
|
||||
game_ini.Get("Wii", "DisableWiimoteSpeaker",&StartUp.bDisableWiimoteSpeaker, StartUp.bDisableWiimoteSpeaker);
|
||||
|
||||
// Wii settings
|
||||
if (StartUp.bWii)
|
||||
|
@ -149,6 +151,7 @@ void Stop()
|
|||
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
|
||||
StartUp.bMergeBlocks = config_cache.bMergeBlocks;
|
||||
StartUp.bDSPHLE = config_cache.bDSPHLE;
|
||||
StartUp.bDisableWiimoteSpeaker = config_cache.bDisableWiimoteSpeaker;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
|||
iRenderWindowWidth(640), iRenderWindowHeight(480),
|
||||
bRenderWindowAutoSize(false),
|
||||
bFullscreen(false), bRenderToMain(false),
|
||||
bProgressive(false),
|
||||
bProgressive(false), bDisableWiimoteSpeaker(false),
|
||||
iTheme(0),
|
||||
iPosX(100), iPosY(100), iWidth(800), iHeight(600)
|
||||
{
|
||||
|
@ -100,6 +100,8 @@ void SCoreStartupParameter::LoadDefaults()
|
|||
bJITPairedOff = false;
|
||||
bJITSystemRegistersOff = false;
|
||||
|
||||
bDisableWiimoteSpeaker = false;
|
||||
|
||||
m_strName = "NONE";
|
||||
m_strUniqueID = "00000000";
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ struct SCoreStartupParameter
|
|||
int SelectedLanguage;
|
||||
|
||||
bool bWii;
|
||||
bool bDisableWiimoteSpeaker;
|
||||
|
||||
// Interface settings
|
||||
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;
|
||||
|
|
|
@ -190,7 +190,7 @@ bool Wiimote::Write()
|
|||
Report rpt;
|
||||
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);
|
||||
delete[] rpt.first;
|
||||
|
|
|
@ -321,6 +321,9 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
// Wii Console
|
||||
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);
|
||||
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
|
||||
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."));
|
||||
|
@ -365,6 +368,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
sbWiiOverrides->ShowItems(false);
|
||||
EnableProgressiveScan->Hide();
|
||||
EnableWideScreen->Hide();
|
||||
DisableWiimoteSpeaker->Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -375,6 +379,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
}
|
||||
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxLEFT, 5);
|
||||
sbWiiOverrides->Add(EnableWideScreen, 0, wxLEFT, 5);
|
||||
sbWiiOverrides->Add(DisableWiimoteSpeaker, 0, wxLEFT, 5);
|
||||
|
||||
wxStaticBoxSizer * const sbVideoOverrides =
|
||||
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
|
||||
|
@ -889,6 +894,11 @@ void CISOProperties::LoadGameConfig()
|
|||
else
|
||||
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))
|
||||
UseZTPSpeedupHack->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
|
@ -977,6 +987,11 @@ bool CISOProperties::SaveGameConfig()
|
|||
else
|
||||
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)
|
||||
GameIni.DeleteKey("Video", "ZTPSpeedupHack");
|
||||
else
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
|
||||
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
|
||||
// Wii
|
||||
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
||||
wxCheckBox *EnableProgressiveScan, *EnableWideScreen, *DisableWiimoteSpeaker;
|
||||
// Video
|
||||
wxCheckBox *UseZTPSpeedupHack, *PHackEnable;
|
||||
wxButton *PHSettings;
|
||||
|
@ -138,6 +138,7 @@ private:
|
|||
ID_PHSETTINGS,
|
||||
ID_ENABLEPROGRESSIVESCAN,
|
||||
ID_ENABLEWIDESCREEN,
|
||||
ID_DISABLEWIIMOTESPEAKER,
|
||||
ID_EDITCONFIG,
|
||||
ID_EMUSTATE,
|
||||
ID_EMU_ISSUES,
|
||||
|
|
Loading…
Reference in New Issue