mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Fix audio focus issue by tracking the cause of lost focus.
Fixes #21643
This commit is contained in:
1 parent
d4bd7c604c
commit
3a599c4714
16 files changed
+95
-70
No files matched your search
+4
-4
@@ -172,7 +172,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void FocusChanged(int focusFlags) override {
|
||||
void FocusChanged(UI::FocusFlags focusFlags) override {
|
||||
UI::Clickable::FocusChanged(focusFlags);
|
||||
TriggerOnHighlight(focusFlags);
|
||||
}
|
||||
@@ -189,11 +189,11 @@ private:
|
||||
down_ = false;
|
||||
OnHoldClick.Trigger(e);
|
||||
}
|
||||
void TriggerOnHighlight(int focusFlags) {
|
||||
void TriggerOnHighlight(UI::FocusFlags focusFlags) {
|
||||
UI::EventParams e{};
|
||||
e.v = this;
|
||||
e.s = gamePath_.ToString();
|
||||
e.a = focusFlags;
|
||||
e.a = (u32)focusFlags;
|
||||
OnHighlight.Trigger(e);
|
||||
}
|
||||
|
||||
@@ -925,7 +925,7 @@ void GameBrowser::Refresh() {
|
||||
b->OnHighlight.Handle(this, &GameBrowser::GameButtonHighlight);
|
||||
|
||||
if (!focusGamePath_.empty() && b->GamePath() == focusGamePath_) {
|
||||
b->SetFocus();
|
||||
b->SetFocus(FocusFlags::CAUSE_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user