diff --git a/Common/System/OSD.h b/Common/System/OSD.h index 5c58e69a37..35ce345651 100644 --- a/Common/System/OSD.h +++ b/Common/System/OSD.h @@ -14,6 +14,7 @@ enum class OSDType { MESSAGE_ERROR, MESSAGE_ERROR_DUMP, // displays lots of text (after the first line), small size MESSAGE_FILE_LINK, + MESSAGE_CENTERED_WARNING, ACHIEVEMENT_UNLOCKED, diff --git a/Core/ConfigValues.h b/Core/ConfigValues.h index 4db23f461d..3e762d632c 100644 --- a/Core/ConfigValues.h +++ b/Core/ConfigValues.h @@ -151,6 +151,7 @@ enum class ScreenEdgePosition { TOP_RIGHT = 5, CENTER_LEFT = 6, CENTER_RIGHT = 7, + CENTER = 8, // Used for REALLY important messages! Not RetroAchievements notifications. VALUE_COUNT, }; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 4611856340..ee9c31f2eb 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -273,6 +273,11 @@ void EmuScreen::bootGame(const Path &filename) { if (!info || info->pending) return; + auto sc = GetI18NCategory(I18NCat::SCREEN); + if (info->fileType == IdentifiedFileType::PSP_DISC_DIRECTORY) { + g_OSD.Show(OSDType::MESSAGE_CENTERED_WARNING, sc->T("Warning: Extracted ISOs often don't work. Play the ISO file directly."), 7.0f); + } + extraAssertInfoStr_ = info->id + " " + info->GetTitle(); SetExtraAssertInfo(extraAssertInfoStr_.c_str()); @@ -283,7 +288,6 @@ void EmuScreen::bootGame(const Path &filename) { g_Discord.SetPresenceGame(info->GetTitle().c_str()); } else { - auto sc = GetI18NCategory(I18NCat::SCREEN); g_Discord.SetPresenceGame(sc->T("Untitled PSP game")); } diff --git a/UI/OnScreenDisplay.cpp b/UI/OnScreenDisplay.cpp index df6915d04b..5ce6af5a4b 100644 --- a/UI/OnScreenDisplay.cpp +++ b/UI/OnScreenDisplay.cpp @@ -53,7 +53,9 @@ static NoticeLevel GetNoticeLevel(OSDType type) { case OSDType::MESSAGE_INFO: return NoticeLevel::INFO; case OSDType::MESSAGE_ERROR: case OSDType::MESSAGE_ERROR_DUMP: return NoticeLevel::ERROR; - case OSDType::MESSAGE_WARNING: return NoticeLevel::WARN; + case OSDType::MESSAGE_WARNING: + case OSDType::MESSAGE_CENTERED_WARNING: + return NoticeLevel::WARN; case OSDType::MESSAGE_SUCCESS: return NoticeLevel::SUCCESS; default: return NoticeLevel::SUCCESS; } @@ -290,6 +292,7 @@ void OnScreenMessagesView::Draw(UIContext &dc) { typeEdges[(size_t)OSDType::LEADERBOARD_STARTED_FAILED] = (ScreenEdgePosition)g_Config.iAchievementsLeaderboardStartedOrFailedPos; typeEdges[(size_t)OSDType::LEADERBOARD_SUBMITTED] = (ScreenEdgePosition)g_Config.iAchievementsLeaderboardSubmittedPos; typeEdges[(size_t)OSDType::ACHIEVEMENT_UNLOCKED] = (ScreenEdgePosition)g_Config.iAchievementsUnlockedPos; + typeEdges[(size_t)OSDType::MESSAGE_CENTERED_WARNING] = ScreenEdgePosition::CENTER; dc.SetFontScale(1.0f, 1.0f); @@ -390,6 +393,7 @@ void OnScreenMessagesView::Draw(UIContext &dc) { case ScreenEdgePosition::BOTTOM_RIGHT: horizAdj = 1; vertAdj = 1; break; case ScreenEdgePosition::TOP_CENTER: vertAdj = -1; break; case ScreenEdgePosition::BOTTOM_CENTER: vertAdj = 1; break; + case ScreenEdgePosition::CENTER: break; default: break; }