mirror of https://github.com/PCSX2/pcsx2.git
mcd: make sure to allow two resume in a row
the cleaner solution would be to make our cdvd implementation using scopecorepausedthread cleaner but I'm probably going to hold off on doing that until I do some major refactoring because the GS merge is alreadying getting out of hand
This commit is contained in:
parent
9814d442cd
commit
2384a3d172
|
@ -40,6 +40,8 @@ static const int MCD_SIZE = 1024 * 8 * 16; // Legacy PSX card default size
|
|||
|
||||
static const int MC2_MBSIZE = 1024 * 528 * 2; // Size of a single megabyte of card data
|
||||
|
||||
bool FileMcd_Open = false;
|
||||
|
||||
// ECC code ported from mymc
|
||||
// https://sourceforge.net/p/mymc-opl/code/ci/master/tree/ps2mc_ecc.py
|
||||
// Public domain license
|
||||
|
@ -596,6 +598,9 @@ uint FileMcd_ConvertToSlot(uint port, uint slot)
|
|||
|
||||
void FileMcd_EmuOpen()
|
||||
{
|
||||
if(FileMcd_Open)
|
||||
return;
|
||||
FileMcd_Open = true;
|
||||
// detect inserted memory card types
|
||||
for (uint slot = 0; slot < 8; ++slot)
|
||||
{
|
||||
|
@ -624,6 +629,9 @@ void FileMcd_EmuOpen()
|
|||
|
||||
void FileMcd_EmuClose()
|
||||
{
|
||||
if(!FileMcd_Open)
|
||||
return;
|
||||
FileMcd_Open = false;
|
||||
Mcd::implFolder.Close();
|
||||
Mcd::impl.Close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue