Small adjustments to the screensaver game info overlay.

This commit is contained in:
Leon Styhre 2020-11-13 00:02:09 +01:00
parent 53cacd5eac
commit f195fcf8a7
2 changed files with 12 additions and 10 deletions

View file

@ -695,7 +695,7 @@ This will fill the entire screen surface but will possibly break the aspect rati
**Display game info overlay** **Display game info overlay**
This will display an overlay in the bottom left corner, showing the game name and the game system name. This will display an overlay in the bottom left corner, showing the game name and the game system name. A star following the game name indicates that it's a favorite.
**Render scanlines** _(OpenGL renderer only)_ **Render scanlines** _(OpenGL renderer only)_
@ -731,7 +731,7 @@ This will fill the entire screen surface but will possibly break the aspect rati
**Display game info overlay** **Display game info overlay**
This will display an overlay in the bottom left corner, showing the game name and the game system name. This will display an overlay in the bottom left corner, showing the game name and the game system name. A star following the game name indicates that it's a favorite.
**Render scanlines** _(OpenGL renderer only)_ **Render scanlines** _(OpenGL renderer only)_

View file

@ -302,13 +302,14 @@ void SystemScreensaver::renderScreensaver()
mGameOverlayRectangleCoords[3], 0x00000000 | mRectangleFadeIn, mGameOverlayRectangleCoords[3], 0x00000000 | mRectangleFadeIn,
0x00000000 | mRectangleFadeIn ); 0x00000000 | mRectangleFadeIn );
} }
if (mRectangleFadeIn < 180) mRectangleFadeIn = Math::clamp(mRectangleFadeIn + 6 +
mRectangleFadeIn = Math::clamp(mRectangleFadeIn + 6, 0, 255); mRectangleFadeIn / 20, 0, 170);
mGameOverlay.get()->setColor(0xFFFFFF00 | mTextFadeIn); mGameOverlay.get()->setColor(0xFFFFFF00 | mTextFadeIn);
mGameOverlayFont.at(0)->renderTextCache(mGameOverlay.get()); if (mTextFadeIn > 50)
mGameOverlayFont.at(0)->renderTextCache(mGameOverlay.get());
if (mTextFadeIn < 255) if (mTextFadeIn < 255)
mTextFadeIn = Math::clamp(mTextFadeIn + 8, 0, 255); mTextFadeIn = Math::clamp(mTextFadeIn + 2 + mTextFadeIn / 6, 0, 255);
} }
} }
else { else {
@ -343,13 +344,14 @@ void SystemScreensaver::renderScreensaver()
mGameOverlayRectangleCoords[3], 0x00000000 | mRectangleFadeIn, mGameOverlayRectangleCoords[3], 0x00000000 | mRectangleFadeIn,
0x00000000 | mRectangleFadeIn ); 0x00000000 | mRectangleFadeIn );
} }
if (mRectangleFadeIn < 180) mRectangleFadeIn = Math::clamp(mRectangleFadeIn + 6 +
mRectangleFadeIn = Math::clamp(mRectangleFadeIn + 6, 0, 255); mRectangleFadeIn / 20, 0, 170);
mGameOverlay.get()->setColor(0xFFFFFF00 | mTextFadeIn); mGameOverlay.get()->setColor(0xFFFFFF00 | mTextFadeIn);
mGameOverlayFont.at(0)->renderTextCache(mGameOverlay.get()); if (mTextFadeIn > 50)
mGameOverlayFont.at(0)->renderTextCache(mGameOverlay.get());
if (mTextFadeIn < 255) if (mTextFadeIn < 255)
mTextFadeIn = Math::clamp(mTextFadeIn + 8, 0, 255); mTextFadeIn = Math::clamp(mTextFadeIn + 2 + mTextFadeIn / 6, 0, 255);
} }
} }
else { else {