gdrom: Notify the game that the lid is closed when swapping disc

This commit is contained in:
Flyinghead 2018-12-21 15:31:04 +01:00
parent 655d36a719
commit bcc8fd57e2
1 changed files with 6 additions and 17 deletions

View File

@ -236,6 +236,10 @@ bool InitDrive(u32 fileflags)
bool DiscSwap(u32 fileflags)
{
// These Additional Sense Codes mean "The lid was closed"
sns_asc = 0x28;
sns_ascq = 0x00;
sns_key = 0x6;
if (settings.imgread.LoadDefaultImage)
{
printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage);
@ -263,16 +267,10 @@ bool DiscSwap(u32 fileflags)
{
NullDriveDiscType=Open;
gd_setdisc();
sns_asc=0x28;
sns_ascq=0x00;
sns_key=0x6;
return true;
}
else if (gfrv == -1)
{
sns_asc=0x28;
sns_ascq=0x00;
sns_key=0x6;
return false;
}
@ -288,18 +286,9 @@ bool DiscSwap(u32 fileflags)
//msgboxf("Selected image failed to load",MBX_ICONERROR);
NullDriveDiscType=Open;
gd_setdisc();
sns_asc=0x28;
sns_ascq=0x00;
sns_key=0x6;
return true;
}
else
{
sns_asc=0x28;
sns_ascq=0x00;
sns_key=0x6;
return true;
}
return true;
}
#endif