Make an rdb option for the save state audio fix
Now it is a per game config option.
This commit is contained in:
parent
61f80d3b55
commit
41c5e26e4a
|
@ -1571,7 +1571,7 @@ bool CN64System::LoadState(void)
|
|||
bool CN64System::LoadState(LPCSTR FileName)
|
||||
{
|
||||
DWORD dwRead, Value,SaveRDRAMSize, NextVITimer = 0;
|
||||
bool LoadedZipFile = false;
|
||||
bool LoadedZipFile = false, AudioResetOnLoad;
|
||||
|
||||
WriteTraceF((TraceType)(TraceDebug | TraceRecompiler),__FUNCTION__ "(%s): Start",FileName);
|
||||
|
||||
|
@ -1727,8 +1727,12 @@ bool CN64System::LoadState(LPCSTR FileName)
|
|||
}
|
||||
|
||||
//Fix losing audio in certain games with certain plugins
|
||||
m_Reg.m_AudioIntrReg |= MI_INTR_AI;
|
||||
m_Reg.AI_STATUS_REG &= ~AI_STATUS_FIFO_FULL;
|
||||
AudioResetOnLoad = g_Settings->LoadBool(Game_AudioResetOnLoad);
|
||||
if (AudioResetOnLoad)
|
||||
{
|
||||
m_Reg.m_AudioIntrReg |= MI_INTR_AI;
|
||||
m_Reg.AI_STATUS_REG &= ~AI_STATUS_FIFO_FULL;
|
||||
}
|
||||
|
||||
//Fix Random Register
|
||||
while ((int)m_Reg.RANDOM_REGISTER < (int)m_Reg.WIRED_REGISTER)
|
||||
|
|
|
@ -95,6 +95,7 @@ enum SettingID {
|
|||
Rdb_GameCheatFixPlugin,
|
||||
Rdb_ViRefreshRate,
|
||||
Rdb_AiCountPerBytes,
|
||||
Rdb_AudioResetOnLoad,
|
||||
|
||||
//Individual Game Settings
|
||||
Game_IniKey,
|
||||
|
@ -139,6 +140,7 @@ enum SettingID {
|
|||
Game_LoadRomToMemory,
|
||||
Game_ViRefreshRate,
|
||||
Game_AiCountPerBytes,
|
||||
Game_AudioResetOnLoad,
|
||||
|
||||
// General Game running info
|
||||
GameRunning_LoadingInProgress,
|
||||
|
|
|
@ -167,6 +167,7 @@ void CSettings::AddHowToHandleSetting ()
|
|||
AddHandler(Rdb_GameCheatFixPlugin, new CSettingTypeRomDatabaseIndex("CheatPlugin","",""));
|
||||
AddHandler(Rdb_ViRefreshRate, new CSettingTypeRomDatabase("ViRefresh",1500));
|
||||
AddHandler(Rdb_AiCountPerBytes, new CSettingTypeRomDatabase("AiCountPerBytes",400));
|
||||
AddHandler(Rdb_AudioResetOnLoad, new CSettingTypeRDBYesNo("AudioResetOnLoad", false));
|
||||
|
||||
AddHandler(Game_IniKey, new CSettingTypeTempString(""));
|
||||
AddHandler(Game_GameName, new CSettingTypeTempString(""));
|
||||
|
@ -210,6 +211,7 @@ void CSettings::AddHowToHandleSetting ()
|
|||
AddHandler(Game_SMM_ValidFunc, new CSettingTypeGame("SMM-FUNC",Rdb_SMM_ValidFunc));
|
||||
AddHandler(Game_ViRefreshRate, new CSettingTypeGame("ViRefresh",Rdb_ViRefreshRate));
|
||||
AddHandler(Game_AiCountPerBytes, new CSettingTypeGame("AiCountPerBytes",Rdb_AiCountPerBytes));
|
||||
AddHandler(Game_AudioResetOnLoad, new CSettingTypeGame("AudioResetOnLoad", Rdb_AudioResetOnLoad));
|
||||
|
||||
//User Interface
|
||||
AddHandler(UserInterface_BasicMode, new CSettingTypeApplication("","Basic Mode", (DWORD)true));
|
||||
|
|
Loading…
Reference in New Issue