From 415880fc40115a34c414b41d0ed84d99ce626171 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 20 May 2020 02:05:17 +1000 Subject: [PATCH] CDROM: Don't restart play/read when current == target Fixes CDDA locking up Buster Bros. Collection. --- src/core/cdrom.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 3c80ba8a4..89094e9b1 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -764,12 +764,12 @@ void CDROM::ExecuteCommand() { SendACKAndStat(); - if (!m_setloc_pending && + if ((!m_setloc_pending || m_setloc_position.ToLBA() == m_current_lba) && (m_drive_state == DriveState::Reading || ((m_drive_state == DriveState::SeekingPhysical || m_drive_state == DriveState::SeekingLogical) && m_read_after_seek))) { - Log_DevPrintf("Ignoring read command with no setloc, already reading/reading after seek"); + Log_DevPrintf("Ignoring read command with no/same setloc, already reading/reading after seek"); } else { @@ -794,12 +794,12 @@ void CDROM::ExecuteCommand() { SendACKAndStat(); - if (!m_setloc_pending && track == 0 && + if (track == 0 && (!m_setloc_pending || m_setloc_position.ToLBA() == m_current_lba) && (m_drive_state == DriveState::Playing || ((m_drive_state == DriveState::SeekingPhysical || m_drive_state == DriveState::SeekingLogical) && m_play_after_seek))) { - Log_DevPrintf("Ignoring play command with no setloc/track, already playing/playing after seek"); + Log_DevPrintf("Ignoring play command with no/same setloc, already playing/playing after seek"); } else {