Skip to content

Commit

Permalink
Merge pull request #19122 from hrydgard/more-minor-fixes
Browse files Browse the repository at this point in the history
More minor fixes
  • Loading branch information
hrydgard authored May 10, 2024
2 parents a06b301 + 699a41a commit 9bef910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GPU/Common/TextureCacheCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions UI/GameInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void GameInfoTex::Clear() {
texture->Release();
texture = nullptr;
}
timeLoaded = 0.0;
}

GameInfo::GameInfo(const Path &gamePath) : filePath_(gamePath) {
Expand Down

0 comments on commit 9bef910

Please sign in to comment.