Commit 2db3cd9d authored by Libretro-Admin's avatar Libretro-Admin
Browse files

MDFNSS_StateAction - remove 'optional'

parent 3f931b8f
Pipeline #44484 passed with stage
in 39 seconds
......@@ -321,7 +321,7 @@ static void StateAction_RINP(StateMem* sm, const unsigned load, const bool data_
};
#undef SFRIH
MDFNSS_StateAction(sm, load, data_only, StateRegs, "MDFNRINP", true);
MDFNSS_StateAction(sm, load, data_only, StateRegs, "MDFNRINP");
}
void MDFN_StateAction(StateMem *sm, const unsigned load, const bool data_only)
......
......@@ -539,16 +539,8 @@ uint32 APU_UpdateGetResampBufPos(uint32 master_timestamp)
int32 APU_EndFrame(int16* SoundBuf)
{
#if 0 // Testing
for(uint32 i = apu_last_master_timestamp; i <= CPUM.timestamp; i++)
APU_Update(i);
#else
APU_Update(CPUM.timestamp);
#endif
#if 0
printf("%02x %02x %02x %02x %s\n", APURAM[0x8000], APURAM[0x8001], APURAM[0x8002], APURAM[0x8003], &APURAM[0x8004]);
#endif
apu_last_master_timestamp = 0;
return DSP_EndFrame(SoundBuf);
......@@ -608,9 +600,7 @@ void APU_StateAction(StateMem* sm, const unsigned load, const bool data_only)
SFEND
};
const bool hle_section_optional = SPC_CPU.GetRegister(SPC700::GSREG_PC) < 0xFFC0;
if(!MDFNSS_StateAction(sm, load, data_only, HLE_StateRegs, "APU_IPL_HLE", hle_section_optional))
if(!MDFNSS_StateAction(sm, load, data_only, HLE_StateRegs, "APU_IPL_HLE"))
{
HLEPhase = 0;
HLELoadAddr = 0;
......
......@@ -120,7 +120,7 @@ void InputDevice_MTap::StateAction(StateMem* sm, const unsigned load, const bool
strncpy(sname + 3, sname_prefix, sizeof(sname) - 3);
sname[sizeof(sname) - 1] = 0;
if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, sname, true) && load)
if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, sname) && load)
Power();
else
{
......@@ -226,7 +226,7 @@ void InputDevice_Gamepad::StateAction(StateMem* sm, const unsigned load, const b
//printf("%s\n", sname);
if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, sname, true) && load)
if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, sname) && load)
Power();
else if(load)
{
......
......@@ -65,7 +65,7 @@ static void FastRWChunk(Stream *st, const SFORMAT *sf)
//
// When updating this function make sure to adhere to the guarantees in state.h.
//
bool MDFNSS_StateAction(StateMem *sm, const unsigned load, const bool data_only, const SFORMAT *sf, const char *sname, const bool optional)
bool MDFNSS_StateAction(StateMem *sm, const unsigned load, const bool data_only, const SFORMAT *sf, const char *sname)
{
Stream* st = sm->st;
static const uint8 SSFastCanary[8] = { 0x42, 0xA3, 0x10, 0x87, 0xBC, 0x6D, 0xF2, 0x79 };
......
......@@ -141,7 +141,7 @@ static INLINE SFORMAT SFCONDVAR_(const bool cond, const SFORMAT sf)
// Does NOT throw exceptions, and must NOT throw exceptions, in order to make sure the emulation-module-specific loaded-variable sanitizing code
// is run.
//
bool MDFNSS_StateAction(StateMem *sm, const unsigned load, const bool data_only, const SFORMAT *sf, const char *name, const bool optional = false);
bool MDFNSS_StateAction(StateMem *sm, const unsigned load, const bool data_only, const SFORMAT *sf, const char *name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment