From ad8a0e6cc0b6b5adb1444121630071faa702b8ec Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 11 Mar 2017 19:31:00 -0800 Subject: [PATCH] Add an ini setting to hide performance warnings. --- Core/Config.cpp | 1 + Core/Config.h | 1 + Core/HLE/sceDisplay.cpp | 2 +- GPU/Directx9/ShaderManagerDX9.cpp | 4 +++- GPU/GLES/ShaderManagerGLES.cpp | 4 +++- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index bb95c18661..c4be6127c8 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -384,6 +384,7 @@ static ConfigSetting cpuSettings[] = { ReportedConfigSetting("IOTimingMethod", &g_Config.iIOTimingMethod, IOTIMING_FAST, true, true), ConfigSetting("FastMemoryAccess", &g_Config.bFastMemory, true, true, true), ReportedConfigSetting("FuncReplacements", &g_Config.bFuncReplacements, true, true, true), + ConfigSetting("HideSlowWarnings", &g_Config.bHideSlowWarnings, false, true, true), ReportedConfigSetting("CPUSpeed", &g_Config.iLockedCPUSpeed, 0, true, true), ConfigSetting(false), diff --git a/Core/Config.h b/Core/Config.h index 6e51a279b9..f036404d0d 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -131,6 +131,7 @@ public: bool bCheckForNewVersion; bool bForceLagSync; bool bFuncReplacements; + bool bHideSlowWarnings; // Definitely cannot be changed while game is running. bool bSeparateCPUThread; diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 16fd327a4d..e62bb722d9 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -662,7 +662,7 @@ void hleEnterVblank(u64 userdata, int cyclesLate) { // Let the user know if we're running slow, so they know to adjust settings. // Sometimes users just think the sound emulation is broken. static bool hasNotifiedSlow = false; - if (!hasNotifiedSlow && IsRunningSlow()) { + if (!g_Config.bHideSlowWarnings && !hasNotifiedSlow && IsRunningSlow()) { I18NCategory *err = GetI18NCategory("Error"); host->NotifyUserMessage(err->T("Running slow: try frameskip, sound is choppy when slow"), 6.0f, 0xFF3030FF); hasNotifiedSlow = true; diff --git a/GPU/Directx9/ShaderManagerDX9.cpp b/GPU/Directx9/ShaderManagerDX9.cpp index 2a703485ab..43ef78d294 100644 --- a/GPU/Directx9/ShaderManagerDX9.cpp +++ b/GPU/Directx9/ShaderManagerDX9.cpp @@ -582,7 +582,9 @@ VSShader *ShaderManagerDX9::ApplyShader(int prim, u32 vertType) { if (vs->Failed()) { I18NCategory *gr = GetI18NCategory("Graphics"); ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform"); - host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF); + if (!g_Config.bHideSlowWarnings) { + host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF); + } delete vs; ComputeVertexShaderID(&VSID, vertType, false); diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 28da7033c2..482cc3ddd0 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -847,7 +847,9 @@ Shader *ShaderManagerGLES::ApplyVertexShader(int prim, u32 vertType, ShaderID *V if (vs->Failed()) { I18NCategory *gr = GetI18NCategory("Graphics"); ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform"); - host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF); + if (!g_Config.bHideSlowWarnings) { + host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF); + } delete vs; // TODO: Look for existing shader with the appropriate ID, use that instead of generating a new one - however, need to make sure