From 8ce7982d8b101cd47827ef4277b245c8d6ff3927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 10 May 2024 13:58:03 +0200 Subject: [PATCH 1/2] Increase the bad texture size threshold. Fixes #19116 --- GPU/Common/TextureCacheCommon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 2b57e6a5a899..c56e11b51d46 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -2833,7 +2833,10 @@ bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEnt plan.scaleFactor = 1; } else if (!g_DoubleTextureCoordinates) { // Refuse to load invalid-ly sized textures, which can happen through display list corruption. - if (plan.w > 1024 || plan.h > 1024) { + // However, turns out some games uses huge textures for font rendering for no apparent reason. + // These will only work correctly in the top 512x512 part. So, I've increased the threshold quite a bit. + // We probably should handle these differently, by clamping the texture size and texture coordinates, but meh. + if (plan.w > 2048 || plan.h > 2048) { ERROR_LOG(G3D, "Bad texture dimensions: %dx%d", plan.w, plan.h); return false; } From 699a41a3fad1ca1f869a3be5099690de48f795b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 10 May 2024 14:15:07 +0200 Subject: [PATCH 2/2] GameInfoCache: Fix issue reloading the BG texture after wiping it from memory Fixes #19077 --- UI/GameInfoCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 2ad0ee1bb4fc..98eedf05cdb4 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -52,6 +52,7 @@ void GameInfoTex::Clear() { texture->Release(); texture = nullptr; } + timeLoaded = 0.0; } GameInfo::GameInfo(const Path &gamePath) : filePath_(gamePath) {