mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Cancel compatibility warning popups if you start another game in the meantime
This commit is contained in:
1 parent
df2d00208e
commit
2b6be8090c
4 files changed
+21
-4
No files matched your search
@@ -129,6 +129,16 @@ void OnScreenDisplay::Show(OSDType type, std::string_view text, std::string_view
|
||||
entries_.insert(entries_.begin(), msg);
|
||||
}
|
||||
|
||||
void OnScreenDisplay::CancelById(std::string_view id) {
|
||||
for (auto iter = entries_.begin(); iter != entries_.end();) {
|
||||
if (iter->id == id) {
|
||||
iter = entries_.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnScreenDisplay::ShowOnOff(std::string_view message, bool on, float duration_s) {
|
||||
std::string msg(message);
|
||||
msg += ": ";
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
void Show(OSDType type, std::string_view text, std::string_view text2, std::string_view icon, float duration_s = 0.0f, const char *id = nullptr);
|
||||
|
||||
void ShowOnOff(std::string_view message, bool on, float duration_s = 0.0f);
|
||||
void CancelById(std::string_view id);
|
||||
|
||||
bool IsEmpty() const { return entries_.empty(); } // Shortcut to skip rendering.
|
||||
|
||||
|
||||
+9
-3
@@ -252,17 +252,23 @@ static void ShowCompatWarnings(const Compatibility &compat) {
|
||||
// UI changes are best done after PSP_InitStart.
|
||||
if (compat.flags().RequireBufferedRendering && g_Config.bSkipBufferEffects && !g_Config.bSoftwareRendering) {
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 10.0f);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 10.0f, "bufreq");
|
||||
} else {
|
||||
g_OSD.CancelById("bufreq");
|
||||
}
|
||||
|
||||
if (compat.flags().RequireBlockTransfer && g_Config.iSkipGPUReadbackMode != (int)SkipGPUReadbackMode::NO_SKIP && !PSP_CoreParameter().compat.flags().ForceEnableGPUReadback) {
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BlockTransferRequired", "Warning: This game requires Skip GPU Readbacks be set to No."), 10.0f);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("BlockTransferRequired", "Warning: This game requires Skip GPU Readbacks be set to No."), 10.0f, "blockxfer");
|
||||
} else {
|
||||
g_OSD.CancelById("blockxfer");
|
||||
}
|
||||
|
||||
if (compat.flags().RequireDefaultCPUClock && g_Config.iLockedCPUSpeed != 0) {
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("DefaultCPUClockRequired", "Warning: This game requires the CPU clock to be set to default."), 10.0f);
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, gr->T("DefaultCPUClockRequired", "Warning: This game requires the CPU clock to be set to default."), 10.0f, "defaultclock");
|
||||
} else {
|
||||
g_OSD.CancelById("defaultclock");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -286,7 +286,7 @@ void EmuScreen::ProcessGameBoot(const Path &filename) {
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, "Shader cache is disabled (developer)");
|
||||
}
|
||||
|
||||
if (g_Config.bTiltInputEnabled && g_Config.iTiltInputType != 0) {
|
||||
if (g_Config.bTiltInputEnabled && g_Config.iTiltInputType != 0 && System_GetPropertyBool(SYSPROP_HAS_ACCELEROMETER)) {
|
||||
auto co = GetI18NCategory(I18NCat::CONTROLS);
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions("%1: %2", co->T("Tilt control"), di->T("Enabled")), "", "I_CONTROLLER", 2.5f, "tilt");
|
||||
|
||||
Reference in new issue
Block a user