mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 13:06:24 +02:00
Make the pause screen "transparent"
When paused (ESC or back), you now see the paused game below, darkened, instead of the usual menu background. Not enabled in VR mode for now because it could get weird. Also not trivial in skip-buffered mode (would require taking a screenshot) so disabled in that case too.
This commit is contained in:
1 parent
a3874ebcef
commit
63cbd9c79b
3 files changed
+37
-6
No files matched your search
@@ -364,6 +364,24 @@ GamePauseScreen::~GamePauseScreen() {
|
||||
__DisplaySetWasPaused();
|
||||
}
|
||||
|
||||
bool GamePauseScreen::isTransparent() const {
|
||||
// We don't support transparent pause screen in skipbuffereffects mode.
|
||||
return !g_Config.bSkipBufferEffects && !IsVREnabled();
|
||||
}
|
||||
|
||||
void GamePauseScreen::DrawBackground(UIContext &dc) {
|
||||
if (isTransparent()) {
|
||||
// Darken the game screen coming from below, so the UI on top stands out.
|
||||
dc.Flush();
|
||||
uint32_t color = blackAlpha(0.45f);
|
||||
dc.FillRect(UI::Drawable(color), dc.GetBounds());
|
||||
dc.Flush();
|
||||
return;
|
||||
}
|
||||
|
||||
UIDialogScreenWithGameBackground::DrawBackground(dc);
|
||||
}
|
||||
|
||||
void GamePauseScreen::CreateViews() {
|
||||
static const int NUM_SAVESLOTS = 5;
|
||||
|
||||
|
||||
Reference in new issue
Block a user