mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Wrap g_Config.bRunBehindPauseMenu behind a function, so we can add conditions
This commit is contained in:
parent
d2ebd36ab9
commit
acd719448e
3 changed files with 9 additions and 3 deletions
|
@ -102,6 +102,10 @@ void Core_Stop() {
|
|||
}
|
||||
}
|
||||
|
||||
bool Core_ShouldRunBehind() {
|
||||
return g_Config.bRunBehindPauseMenu;
|
||||
}
|
||||
|
||||
bool Core_IsStepping() {
|
||||
return coreState == CORE_STEPPING || coreState == CORE_POWERDOWN;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ void Core_SetGraphicsContext(GraphicsContext *ctx);
|
|||
// called from gui
|
||||
void Core_EnableStepping(bool step, const char *reason = nullptr, u32 relatedAddress = 0);
|
||||
|
||||
bool Core_ShouldRunBehind();
|
||||
|
||||
bool Core_NextFrame();
|
||||
void Core_DoSingleStep();
|
||||
void Core_UpdateSingleStep();
|
||||
|
|
|
@ -1448,11 +1448,11 @@ static void DrawFPS(UIContext *ctx, const Bounds &bounds) {
|
|||
|
||||
bool EmuScreen::canBeBackground(bool isTop) const {
|
||||
if (g_Config.bSkipBufferEffects) {
|
||||
return isTop || (g_Config.bTransparentBackground && g_Config.bRunBehindPauseMenu);
|
||||
return isTop || (g_Config.bTransparentBackground && Core_ShouldRunBehind());
|
||||
}
|
||||
|
||||
if (!g_Config.bTransparentBackground && !isTop) {
|
||||
if (g_Config.bRunBehindPauseMenu || screenManager()->topScreen()->wantBrightBackground())
|
||||
if (Core_ShouldRunBehind() || screenManager()->topScreen()->wantBrightBackground())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
|
||||
if (mode & ScreenRenderMode::TOP) {
|
||||
System_Notify(SystemNotification::KEEP_SCREEN_AWAKE);
|
||||
} else if (!g_Config.bRunBehindPauseMenu && strcmp(screenManager()->topScreen()->tag(), "DevMenu") != 0) {
|
||||
} else if (!Core_ShouldRunBehind() && strcmp(screenManager()->topScreen()->tag(), "DevMenu") != 0) {
|
||||
// Not on top. Let's not execute, only draw the image.
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::DONT_CARE, RPAction::DONT_CARE }, "EmuScreen_Stepping");
|
||||
// Just to make sure.
|
||||
|
|
Loading…
Add table
Reference in a new issue