Check if there is a disc for all disc reads
This commit is contained in:
parent
867bd2eb34
commit
14ff0004b5
|
@ -628,6 +628,13 @@ DVDCommandResult ExecuteReadCommand(u64 DVD_offset, u32 output_address,
|
|||
DVDCommandResult result;
|
||||
result.ticks_until_completion = SimulateDiscReadTime(DVD_offset, DVD_length);
|
||||
|
||||
if (!g_bDiscInside)
|
||||
{
|
||||
g_ErrorCode = ERROR_NO_DISK | ERROR_COVER_H;
|
||||
result.interrupt_type = INT_DEINT;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!DVDRead(DVD_offset, output_address, DVD_length, raw))
|
||||
PanicAlertT("Can't read from DVD_Plugin - DVD-Interface: Fatal Error");
|
||||
|
||||
|
@ -811,8 +818,6 @@ DVDCommandResult ExecuteCommand(u32 command_0, u32 command_1, u32 command_2,
|
|||
|
||||
// DMA Read from Disc. Only seems to be used through direct access, not WII_IPC
|
||||
case 0xA8:
|
||||
if (g_bDiscInside)
|
||||
{
|
||||
switch (command_0 & 0xFF)
|
||||
{
|
||||
case 0x00: // Read Sector
|
||||
|
@ -885,13 +890,6 @@ DVDCommandResult ExecuteCommand(u32 command_0, u32 command_1, u32 command_2,
|
|||
ERROR_LOG(DVDINTERFACE, "Unknown read subcommand: %08x", command_0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// there is no disc to read
|
||||
g_ErrorCode = ERROR_NO_DISK | ERROR_COVER_H;
|
||||
result.interrupt_type = INT_DEINT;
|
||||
}
|
||||
break;
|
||||
|
||||
// GC-AM only
|
||||
|
|
Loading…
Reference in New Issue