mirror of https://github.com/PCSX2/pcsx2.git
Clear memory card ejection timeout when a game boots.
This eliminates prompts at the start of a game complaining about no memory card being inserted. I'm honestly not entirely sure if this is safe (is there some memory card driver that could cache results between different executables?) but if it isn't we'll see it soon enough!
This commit is contained in:
parent
e774011d71
commit
c651d28cc0
|
@ -60,6 +60,13 @@ void SetForceMcdEjectTimeoutNow()
|
||||||
mcds[port][slot].ForceEjection_Timeout = FORCED_MCD_EJECTION_MAX_TRIES;
|
mcds[port][slot].ForceEjection_Timeout = FORCED_MCD_EJECTION_MAX_TRIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClearMcdEjectTimeoutNow()
|
||||||
|
{
|
||||||
|
for( u8 port=0; port<2; ++port )
|
||||||
|
for( u8 slot=0; slot<4; ++slot )
|
||||||
|
mcds[port][slot].ForceEjection_Timeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// SIO Inline'd IRQs : Calls the SIO interrupt handlers directly instead of
|
// SIO Inline'd IRQs : Calls the SIO interrupt handlers directly instead of
|
||||||
// feeding them through the IOP's branch test. (see SIO.H for details)
|
// feeding them through the IOP's branch test. (see SIO.H for details)
|
||||||
|
|
||||||
|
|
|
@ -127,5 +127,6 @@ extern void sioWriteCtrl16(u16 value);
|
||||||
extern void sioInterrupt();
|
extern void sioInterrupt();
|
||||||
extern void InitializeSIO(u8 value);
|
extern void InitializeSIO(u8 value);
|
||||||
extern void SetForceMcdEjectTimeoutNow();
|
extern void SetForceMcdEjectTimeoutNow();
|
||||||
|
extern void ClearMcdEjectTimeoutNow();
|
||||||
extern void sioNextFrame();
|
extern void sioNextFrame();
|
||||||
extern void sioSetGameSerial(const wxString& serial);
|
extern void sioSetGameSerial(const wxString& serial);
|
||||||
|
|
|
@ -522,6 +522,7 @@ void AppCoreThread::GameStartingInThread()
|
||||||
m_ExecMode = ExecMode_Paused;
|
m_ExecMode = ExecMode_Paused;
|
||||||
OnResumeReady();
|
OnResumeReady();
|
||||||
_reset_stuff_as_needed();
|
_reset_stuff_as_needed();
|
||||||
|
ClearMcdEjectTimeoutNow(); // probably safe to do this when a game boots, eliminates annoying prompts
|
||||||
m_ExecMode = ExecMode_Opened;
|
m_ExecMode = ExecMode_Opened;
|
||||||
|
|
||||||
_parent::GameStartingInThread();
|
_parent::GameStartingInThread();
|
||||||
|
|
Loading…
Reference in New Issue