From e37decc9a891bc6f3f1c9f901f1dddb3532adb1c Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 14 Mar 2017 10:36:51 +0100 Subject: [PATCH] Warn if trying to run some games that are known to require buffered rendering with it not enabled. --- Core/Compatibility.cpp | 1 + Core/Compatibility.h | 1 + UI/EmuScreen.cpp | 6 ++++++ assets/compat.ini | 27 +++++++++++++++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index 5f26b33db5..c6741b9383 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -52,6 +52,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "Force04154000Download", &flags_.Force04154000Download); CheckSetting(iniFile, gameID, "DrawSyncEatCycles", &flags_.DrawSyncEatCycles); CheckSetting(iniFile, gameID, "FakeMipmapChange", &flags_.FakeMipmapChange); + CheckSetting(iniFile, gameID, "RequireBufferedRendering", &flags_.RequireBufferedRendering); } void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 449c01e3f3..88960c725c 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -52,6 +52,7 @@ struct CompatFlags { bool Force04154000Download; bool DrawSyncEatCycles; bool FakeMipmapChange; + bool RequireBufferedRendering; }; class IniFile; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 7a5a4ca7a4..0cc8b44f03 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -208,6 +208,7 @@ void EmuScreen::bootGame(const std::string &filename) { coreParam.pixelWidth = pixel_xres; coreParam.pixelHeight = pixel_yres; + std::string error_string; if (!PSP_InitStart(coreParam, &error_string)) { bootPending_ = false; @@ -216,6 +217,11 @@ void EmuScreen::bootGame(const std::string &filename) { ERROR_LOG(BOOT, "%s", errorMessage_.c_str()); System_SendMessage("event", "failstartgame"); } + + if (PSP_CoreParameter().compat.flags().RequireBufferedRendering && g_Config.iRenderingMode == FB_NON_BUFFERED_MODE) { + I18NCategory *gr = GetI18NCategory("Graphics"); + host->NotifyUserMessage(gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 15.0f); + } } void EmuScreen::bootComplete() { diff --git a/assets/compat.ini b/assets/compat.ini index 00adc21e42..a8aad506eb 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -162,3 +162,30 @@ NPJH50843 = true ULJM05753 = true NPJH50348 = true ULJM06009 = true + +[RequireBufferedRendering] +# Warn the user that the game will not work, if buffered rendering is not enabled. +# Midnight Club: LA Remix +ULUS10383 = true +ULES01144 = true +ULJS00180 = true +ULJS00267 = true +ULJM05904 = true +NPJH50440 = true +# Midnight Club 3 : DUB edition +ULUS10021 = true +ULES00108 = true +# GTA : VCS +ULUS10160 = true +ULES00502 = true +ULJM05297 = true +ULJM05395 = true +ULJM05884 = true +NPJH50827 = true +# GTA : LCS +ULUS10041 = true +ULES00151 = true +ULJM05255 = true +ULJM05359 = true +ULJM05885 = true +NPJH50825 = true \ No newline at end of file