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:
skidau
2011-05-25 15:01:49 +00:00
parent fa7a521086
commit a9f7a0c284
6 changed files with 26 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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";
}

View File

@ -120,6 +120,7 @@ struct SCoreStartupParameter
int SelectedLanguage;
bool bWii;
bool bDisableWiimoteSpeaker;
// Interface settings
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;

View File

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