diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-06-03 12:53:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-03 12:53:33 +0200 |
| commit | 0b3d28abaf2563b64a83acae82ace2f5149d2855 (patch) | |
| tree | 3fab330b02a857d2784330407c8dc80c6a1dc157 /Source/Core/VideoCommon/CommandProcessor.cpp | |
| parent | 3245786af7ca5d1ea7c4ef4f71aea07f5d7bf7da (diff) | |
| parent | f2be35c7cdc97e53f3d9f424ec29d3cbeb6989d5 (diff) | |
Merge pull request #11586 from JosJuice/unknown-opcode-msg
VideoCommon: Reword the unknown opcode error message
Diffstat (limited to 'Source/Core/VideoCommon/CommandProcessor.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/CommandProcessor.cpp | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp index 3174c2983a..70682941df 100644 --- a/Source/Core/VideoCommon/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/CommandProcessor.cpp @@ -12,6 +12,7 @@ #include "Common/CommonTypes.h" #include "Common/Flag.h" #include "Common/Logging/Log.h" +#include "Common/MsgHandler.h" #include "Core/ConfigManager.h" #include "Core/CoreTiming.h" #include "Core/HW/GPFifo.h" @@ -695,16 +696,50 @@ void CommandProcessorManager::HandleUnknownOpcode(Core::System& system, u8 cmd_b { m_is_fifo_error_seen = true; - // TODO(Omega): Maybe dump FIFO to file on this error + // The panic alert contains an explanatory part that's worded differently depending on the + // user's settings, so as to offer the most relevant advice to the user. + const char* advice; + if (IsOnThread(system) && !system.GetFifo().UseDeterministicGPUThread()) + { + if (!system.GetCoreTiming().UseSyncOnSkipIdle() && !system.GetFifo().UseSyncGPU()) + { +// The SyncOnSkipIdle setting is only in the Android GUI, so we use the INI name on other platforms. +// +// TODO: Mark the Android string as translatable once we have translations on Android. It's +// currently untranslatable so translators won't try to look up how they translated "Synchronize +// GPU Thread" and "On Idle Skipping" and then not find those strings and become confused. +#ifdef ANDROID + advice = "Please change the \"Synchronize GPU Thread\" setting to \"On Idle Skipping\"! " + "It's currently set to \"Never\", which makes this problem very likely to happen."; +#else + // i18n: Please leave SyncOnSkipIdle and True untranslated. + // The user needs to enter these terms as-is in an INI file. + advice = _trans("Please change the \"SyncOnSkipIdle\" setting to \"True\"! " + "It's currently disabled, which makes this problem very likely to happen."); +#endif + } + else + { + advice = _trans( + "This error is usually caused by the emulated GPU desyncing with the emulated CPU. " + "Turn off the \"Dual Core\" setting to avoid this."); + } + } + else + { + advice = _trans( + "This error is usually caused by the emulated GPU desyncing with the emulated CPU, " + "but your current settings make this unlikely to happen. If this error is stopping the " + "game from working, please report it to the developers."); + } + PanicAlertFmtT("GFX FIFO: Unknown Opcode ({0:#04x} @ {1}, preprocess={2}).\n" - "This means one of the following:\n" - "* The emulated GPU got desynced, disabling dual core can help\n" - "* Command stream corrupted by some spurious memory bug\n" - "* This really is an unknown opcode (unlikely)\n" - "* Some other sort of bug\n\n" - "Further errors will be sent to the Video Backend log and\n" + "\n" + "{3}\n" + "\n" + "Further errors will be sent to the Video Backend log and " "Dolphin will now likely crash or hang.", - cmd_byte, fmt::ptr(buffer), preprocess); + cmd_byte, fmt::ptr(buffer), preprocess, Common::GetStringT(advice)); } } |
