Merge pull request #13556 from jordan-woyak/dvd-interface-crash-fix

DVDInterface: Fix crash when playing wiiware.
This commit is contained in:
JMC47 2025-04-21 22:15:12 -04:00 committed by GitHub
commit 0f30b59aef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -756,7 +756,7 @@ void DVDInterface::ExecuteCommand(ReplyType reply_type)
// Swaps endian of Triforce DI commands, and zeroes out random bytes to prevent unknown read
// subcommand errors
auto& dvd_thread = m_system.GetDVDThread();
if (dvd_thread.GetDiscType() == DiscIO::Platform::Triforce)
if (dvd_thread.HasDisc() && dvd_thread.GetDiscType() == DiscIO::Platform::Triforce)
{
// TODO(C++23): Use std::byteswap and a bitwise AND for increased clarity
m_DICMDBUF[0] <<= 24;