From 7d4b56e4bc3d5ae6d9c9045a46b42ea53b3fa5a0 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 15 May 2024 19:26:24 +0200 Subject: [PATCH] EasyRpg Flag: Move bmp.reset call to the correct location --- src/cache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 5e55a868f7..9006b07f41 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -275,11 +275,12 @@ namespace { Output::Warning("Invalid image: {}/{}", s.directory, filename); } else { if (bmp->GetOriginalBpp() > 8) { + // FIXME: This HasActiveTranslation check will also load 32 bit images in the game directory when + // a translation is active and our API does not expose whether the asset was redirected or not. if (!Player::HasEasyRpgExtensions() && !Player::IsPatchManiac() && !Tr::HasActiveTranslation()) { Output::Warning("Image {}/{} has a bit depth of {} that is not supported by RPG_RT. Enable EasyRPG Extensions or Maniac Patch to load such images.", s.directory, filename, bmp->GetOriginalBpp()); + bmp.reset(); } - - bmp.reset(); } } }