8000 Run-behind-pause: Fix some edge cases with the transparent background setting by hrydgard · Pull Request #18517 · hrydgard/ppsspp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Run-behind-pause: Fix some edge cases with the transparent background setting #18517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Common/UI/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ void ScreenManager::sendMessage(UIMessage message, const char *value) {
}
}

Screen *ScreenManager::topScreen() const {
if (!stack_.empty())
return stack_.back().screen;
else
return 0;
}

void ScreenManager::shutdown() {
std::lock_guard<std::recursive_mutex> guard(inputLock_);
for (auto layer : stack_)
Expand Down
8 changes: 7 additions & 1 deletion Common/UI/Screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class Screen {
virtual void RecreateViews() {}

ScreenManager *screenManager() { return screenManager_; }
const ScreenManager *screenManager() const { return screenManager_; }
void setScreenManager(ScreenManager *sm) { screenManager_ = sm; }

virtual const char *tag() const = 0;
Expand Down Expand Up @@ -158,7 +159,12 @@ class ScreenManager {
// Generic facility for gross hacks :P
void sendMessage(UIMessage message, const char *value);

Screen *topScreen() const;
const Screen *topScreen() const {
return stack_.empty() ? nullptr : stack_.back().screen;
}
Screen *topScreen() {
return stack_.empty() ? nullptr : stack_.back().screen;
}

void getFocusPosition(float &x, float &y, float &z);

Expand Down
8 changes: 4 additions & 4 deletions UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,11 +1420,11 @@ bool EmuScreen::canBeBackground(bool isTop) const {
return isTop || (g_Config.bTransparentBackground && g_Config.bRunBehindPauseMenu);
}

bool forceTransparent = false; // this needs to be true somehow on the display layout screen.

if (!g_Config.bTransparentBackground && !forceTransparent)
if (!g_Config.bTransparentBackground && !isTop) {
if (g_Config.bRunBehindPauseMenu || screenManager()->topScreen()->wantBrightBackground())
return true;
return false;

}
return true;
}

Expand Down
0