diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index af640e49e878..6b7a7b3c8693 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -149,7 +149,7 @@ TouchInput UIScreen::transformTouch(const TouchInput &touch) { } void UIScreen::touch(const TouchInput &touch) { - if (root_) { + if (root_ && !ignoreInput_) { if (ClickDebug && (touch.flags & TOUCH_DOWN)) { INFO_LOG(SYSTEM, "Touch down!"); std::vector views; @@ -164,13 +164,21 @@ void UIScreen::touch(const TouchInput &touch) { } bool UIScreen::key(const KeyInput &key) { - if (root_) { + if (root_ && !ignoreInput_) { return UI::KeyEvent(key, root_); } return false; } +void UIScreen::axis(const AxisInput &axis) { + if (root_ && !ignoreInput_) { + UI::AxisEvent(axis, root_); + } +} + void UIScreen::TriggerFinish(DialogResult result) { + // From here on, this dialog cannot receive input. + ignoreInput_ = true; screenManager()->finishDialog(this, result); } @@ -196,12 +204,6 @@ void UIDialogScreen::sendMessage(const char *msg, const char *value) { } } -void UIScreen::axis(const AxisInput &axis) { - if (root_) { - UI::AxisEvent(axis, root_); - } -} - UI::EventReturn UIScreen::OnBack(UI::EventParams &e) { TriggerFinish(DR_BACK); return UI::EVENT_DONE; @@ -313,6 +315,7 @@ void PopupScreen::SetPopupOffset(float y) { void PopupScreen::TriggerFinish(DialogResult result) { if (CanComplete(result)) { + ignoreInput_ = true; finishFrame_ = frames_; finishResult_ = result; diff --git a/Common/UI/UIScreen.h b/Common/UI/UIScreen.h index 0500c5f66f28..1d5443a5fa8a 100644 --- a/Common/UI/UIScreen.h +++ b/Common/UI/UIScreen.h @@ -50,6 +50,7 @@ class UIScreen : public Screen { Vec3 scale_ = Vec3(1.0f); float alpha_ = 1.0f; bool ignoreInsets_ = false; + bool ignoreInput_ = false; private: void DoRecreateViews(); diff --git a/SDL/macOS b/SDL/macOS index c387d93ab591..f19a1d54b8a5 160000 --- a/SDL/macOS +++ b/SDL/macOS @@ -1 +1 @@ -Subproject commit c387d93ab5910b5a6be78b4840a5bbbc452f3ac8 +Subproject commit f19a1d54b8a5af6cc378ea307e0ec676922eb4cc diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index bcacf3f4d68a..7f624c5639f8 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -337,6 +337,8 @@ void KeyMappingNewKeyDialog::CreatePopupContents(UI::ViewGroup *parent) { } bool KeyMappingNewKeyDialog::key(const KeyInput &key) { + if (ignoreInput_) + return true; if (time_now_d() < delayUntil_) return true; if (key.flags & KEY_DOWN) { @@ -390,6 +392,8 @@ void KeyMappingNewMouseKeyDialog::CreatePopupContents(UI::ViewGroup *parent) { bool KeyMappingNewMouseKeyDialog::key(const KeyInput &key) { if (mapped_) return false; + if (ignoreInput_) + return true; if (key.flags & KEY_DOWN) { if (key.keyCode == NKCODE_ESCAPE) { TriggerFinish(DR_OK); @@ -428,6 +432,8 @@ void KeyMappingNewKeyDialog::axis(const AxisInput &axis) { return; if (IgnoreAxisForMapping(axis.axisId)) return; + if (ignoreInput_) + return; if (axis.value > AXIS_BIND_THRESHOLD) { InputMapping mapping(axis.deviceId, axis.axisId, 1); @@ -448,6 +454,7 @@ void KeyMappingNewKeyDialog::axis(const AxisInput &axis) { InputMapping pos(axis.deviceId, axis.axisId, 1); if (triggeredAxes_.find(neg) != triggeredAxes_.end() || triggeredAxes_.find(pos) != triggeredAxes_.end()) { // "Key-up" the axis. + NOTICE_LOG(COMMON, "TriggerFInish"); TriggerFinish(DR_YES); if (callback_) callback_(mapping_); diff --git a/ext/cpu_features b/ext/cpu_features index 75ec988188f6..c74a85d64a64 160000 --- a/ext/cpu_features +++ b/ext/cpu_features @@ -1 +1 @@ -Subproject commit 75ec988188f62281efe7bf1d133338751369bb4c +Subproject commit c74a85d64a64594fab865c8fd86865be8ac2bf87 diff --git a/ext/zstd b/ext/zstd index 63779c798237..096dccbc2d89 160000 --- a/ext/zstd +++ b/ext/zstd @@ -1 +1 @@ -Subproject commit 63779c798237346c2b245c546c40b72a5a5913fe +Subproject commit 096dccbc2d89a560db0b9892c53ea0c77eff20a1