Avoid using panic alerts in DiscIO

Panic alerts in DiscIO can potentially be very annoying since
large amounts of them can pop up when loading the game list
if you have some particularly weird files in your game list.

This was a much bigger problem back in 5.0 with its
"Tried to decrypt data from a non-Wii volume" panic alert, but
I figured I would take it all the way and remove the remaining
panic alerts that can show up when loading the game list.

I have exempted uses of ASSERT/ASSERT_MSG since they indicate
a bug in Dolphin rather than a malformed file.
This commit is contained in:
JosJuice
2021-03-20 11:50:00 +01:00
parent bcd572a820
commit d1946aded6
4 changed files with 15 additions and 16 deletions

View File

@ -12,7 +12,6 @@
#include "Common/CommonTypes.h"
#include "Common/IOFile.h"
#include "Common/Logging/Log.h"
#include "Common/MsgHandler.h"
#include "DiscIO/Blob.h"
#include "DiscIO/DriveBlob.h"
@ -146,7 +145,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8* o
!ReadFile(m_disc_handle, out_ptr, static_cast<DWORD>(GetSectorSize() * num_blocks),
&bytes_read, nullptr))
{
PanicAlertFmtT("Disc Read Error");
ERROR_LOG_FMT(DISCIO, "Disc Read Error");
return false;
}
return bytes_read == GetSectorSize() * num_blocks;