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:
skidau 2011-02-23 10:01:04 +00:00
commit 9680d3ac95
5 changed files with 45 additions and 11 deletions

View file

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

View file

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

View file

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