summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-06-28 10:38:03 -0700
committerPokechu22 <Pokechu022@gmail.com>2021-06-28 10:38:03 -0700
commite440b21640adfef98ad18c217748587dfe585ee3 (patch)
tree042592b489eff0dcbce2ccf86ee6e7d195b3cb89 /Source/Core
parentbb2d576ecc04b8670916a296e069f1752aabd40f (diff)
DVDInterface: Fix decrypting reads clearing the drive state
This broke ejecting Wii discs while the game is running, as the drive state was set to Ready even when no disc was present, but other code still reported the missing disc, which confused games as you can't be both ready to read and have no disc. That would cause games to show an unrecoverable error screen, instead of a "please insert the game disc" screen. This only affected Wii games; the GameCube games used regular disc reads which worked fine.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/DVD/DVDInterface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp
index dd9a2c0ccf..3f239c32e1 100644
--- a/Source/Core/Core/HW/DVD/DVDInterface.cpp
+++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp
@@ -1251,7 +1251,9 @@ void PerformDecryptingRead(u32 position, u32 length, u32 output_address,
const DiscIO::Partition& partition, ReplyType reply_type)
{
DIInterruptType interrupt_type = DIInterruptType::TCINT;
- SetDriveState(DriveState::Ready);
+
+ if (s_drive_state == DriveState::ReadyNoReadsMade)
+ SetDriveState(DriveState::Ready);
const bool command_handled_by_thread =
ExecuteReadCommand(static_cast<u64>(position) << 2, output_address, length, length, partition,