mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Merge pull request #18141 from hrydgard/chat-window-close-fix
Fix the chat window closing on pressing the X key.
This commit is contained in:
2 files changed
+19
-10
No files matched your search
+16
-10
@@ -844,21 +844,27 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
System_Notify(SystemNotification::ACTIVITY);
|
||||
|
||||
if (UI::IsFocusMovementEnabled()) {
|
||||
bool retval = UIScreen::UnsyncKey(key);
|
||||
if ((key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) {
|
||||
if (chatMenu_)
|
||||
chatMenu_->Close();
|
||||
if (chatButton_)
|
||||
chatButton_->SetVisibility(UI::V_VISIBLE);
|
||||
UI::EnableFocusMovement(false);
|
||||
retval = true;
|
||||
}
|
||||
return retval;
|
||||
return UIScreen::UnsyncKey(key);
|
||||
}
|
||||
|
||||
return controlMapper_.Key(key, &pauseTrigger_);
|
||||
}
|
||||
|
||||
bool EmuScreen::key(const KeyInput &key) {
|
||||
bool retval = UIScreen::key(key);
|
||||
|
||||
if (!retval && (key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) {
|
||||
if (chatMenu_)
|
||||
chatMenu_->Close();
|
||||
if (chatButton_)
|
||||
chatButton_->SetVisibility(UI::V_VISIBLE);
|
||||
UI::EnableFocusMovement(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void EmuScreen::UnsyncAxis(const AxisInput &axis) {
|
||||
System_Notify(SystemNotification::ACTIVITY);
|
||||
return controlMapper_.Axis(axis);
|
||||
|
||||
@@ -55,6 +55,9 @@ public:
|
||||
bool UnsyncKey(const KeyInput &key) override;
|
||||
void UnsyncAxis(const AxisInput &axis) override;
|
||||
|
||||
// We also need to do some special handling of queued UI events to handle closing the chat window.
|
||||
bool key(const KeyInput &key) override;
|
||||
|
||||
private:
|
||||
void CreateViews() override;
|
||||
UI::EventReturn OnDevTools(UI::EventParams ¶ms);
|
||||
|
||||
Reference in new issue
Block a user