mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 03:25:36 +00:00
CDROM: Display OSD message on backend read fail
This commit is contained in:
parent
7310aa509a
commit
4ea90f948d
@ -27,6 +27,7 @@
|
|||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
#include "common/xorshift_prng.h"
|
#include "common/xorshift_prng.h"
|
||||||
|
|
||||||
|
#include "IconsEmoji.h"
|
||||||
#include "fmt/format.h"
|
#include "fmt/format.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
|
||||||
@ -3259,8 +3260,13 @@ void CDROM::StopMotor()
|
|||||||
void CDROM::DoSectorRead()
|
void CDROM::DoSectorRead()
|
||||||
{
|
{
|
||||||
// TODO: Queue the next read here and swap the buffer.
|
// TODO: Queue the next read here and swap the buffer.
|
||||||
if (!s_reader.WaitForReadToComplete())
|
if (!s_reader.WaitForReadToComplete()) [[unlikely]]
|
||||||
{
|
{
|
||||||
|
Host::AddIconOSDWarning(
|
||||||
|
"DiscReadError", ICON_EMOJI_WARNING,
|
||||||
|
TRANSLATE_STR("OSDMessage", "Failed to read sector from disc image. The game will probably crash now.\nYour "
|
||||||
|
"dump may be corrupted, or the physical disc is scratched."),
|
||||||
|
Host::OSD_CRITICAL_ERROR_DURATION);
|
||||||
StopReadingWithError();
|
StopReadingWithError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user