From aae8a9275997683984feba7d00e5ecc39163a60d Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Fri, 13 Mar 2020 15:49:17 +0100 Subject: [PATCH] Skip rendering of objects that are invisible (alpha = 0). --- RetroFE/Source/SDL.cpp | 4 ++++ RetroFE/Source/Version.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RetroFE/Source/SDL.cpp b/RetroFE/Source/SDL.cpp index 35e68e8..7ec3f9f 100644 --- a/RetroFE/Source/SDL.cpp +++ b/RetroFE/Source/SDL.cpp @@ -276,6 +276,10 @@ SDL_Window* SDL::getWindow( ) bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect *dest, ViewInfo &viewInfo, float scaleX, float scaleY ) { + // Skip rendering if the object is invisible anyway + if ( alpha == 0 ) + return true; + SDL_Rect srcRect; SDL_Rect dstRect; SDL_Rect srcRectCopy; diff --git a/RetroFE/Source/Version.cpp b/RetroFE/Source/Version.cpp index 6ce8142..5952e0b 100644 --- a/RetroFE/Source/Version.cpp +++ b/RetroFE/Source/Version.cpp @@ -21,7 +21,7 @@ std::string retrofe_version_major = "0"; std::string retrofe_version_minor = "9"; -std::string retrofe_version_build = "23"; +std::string retrofe_version_build = "24"; std::string Version::getString( )