diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index ef63523cf..75ecffcc4 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -679,7 +679,7 @@ void FullscreenUI::ToggleTheme() void FullscreenUI::PauseForMenuOpen(bool set_pause_menu_open) { s_was_paused_on_quick_menu_open = (System::GetState() == System::State::Paused); - if (g_settings.pause_on_menu && !s_was_paused_on_quick_menu_open) + if (!s_was_paused_on_quick_menu_open) Host::RunOnCPUThread([]() { System::PauseSystem(true); }); s_pause_menu_was_open |= set_pause_menu_open; @@ -2722,9 +2722,6 @@ void FullscreenUI::DrawInterfaceSettingsPage() FSUI_CSTR("Pauses the emulator when you minimize the window or switch to another " "application, and unpauses when you switch back."), "Main", "PauseOnFocusLoss", false); - DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_WINDOW_MAXIMIZE, "Pause On Menu"), - FSUI_CSTR("Pauses the emulator when you open the quick menu, and unpauses when you close it."), - "Main", "PauseOnMenu", true); DrawToggleSetting( bsi, FSUI_ICONSTR(ICON_FA_POWER_OFF, "Confirm Power Off"), FSUI_CSTR("Determines whether a prompt will be displayed to confirm shutting down the emulator/game " @@ -7084,11 +7081,9 @@ TRANSLATE_NOOP("FullscreenUI", "Patches"); TRANSLATE_NOOP("FullscreenUI", "Patches the BIOS to skip the boot animation. Safe to enable."); TRANSLATE_NOOP("FullscreenUI", "Path"); TRANSLATE_NOOP("FullscreenUI", "Pause On Focus Loss"); -TRANSLATE_NOOP("FullscreenUI", "Pause On Menu"); TRANSLATE_NOOP("FullscreenUI", "Pause On Start"); TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when a game is started."); TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when you minimize the window or switch to another application, and unpauses when you switch back."); -TRANSLATE_NOOP("FullscreenUI", "Pauses the emulator when you open the quick menu, and unpauses when you close it."); TRANSLATE_NOOP("FullscreenUI", "Per-Game Configuration"); TRANSLATE_NOOP("FullscreenUI", "Per-game controller configuration initialized with global settings."); TRANSLATE_NOOP("FullscreenUI", "Performance enhancement - jumps directly between blocks instead of returning to the dispatcher."); diff --git a/src/core/settings.cpp b/src/core/settings.cpp index c8cf14e78..de7cd5a38 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -144,7 +144,6 @@ void Settings::Load(SettingsInterface& si) start_paused = si.GetBoolValue("Main", "StartPaused", false); start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false); pause_on_focus_loss = si.GetBoolValue("Main", "PauseOnFocusLoss", false); - pause_on_menu = si.GetBoolValue("Main", "PauseOnMenu", true); save_state_on_exit = si.GetBoolValue("Main", "SaveStateOnExit", true); create_save_state_backups = si.GetBoolValue("Main", "CreateSaveStateBackups", DEFAULT_SAVE_STATE_BACKUPS); compress_save_states = si.GetBoolValue("Main", "CompressSaveStates", DEFAULT_SAVE_STATE_COMPRESSION); @@ -408,7 +407,6 @@ void Settings::Save(SettingsInterface& si) const si.SetBoolValue("Main", "StartPaused", start_paused); si.SetBoolValue("Main", "StartFullscreen", start_fullscreen); si.SetBoolValue("Main", "PauseOnFocusLoss", pause_on_focus_loss); - si.SetBoolValue("Main", "PauseOnMenu", pause_on_menu); si.SetBoolValue("Main", "SaveStateOnExit", save_state_on_exit); si.SetBoolValue("Main", "CreateSaveStateBackups", create_save_state_backups); si.SetBoolValue("Main", "CompressSaveStates", compress_save_states); diff --git a/src/core/settings.h b/src/core/settings.h index 427b93922..80c6cdf21 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -75,7 +75,6 @@ struct Settings bool start_paused = false; bool start_fullscreen = false; bool pause_on_focus_loss = false; - bool pause_on_menu = true; bool save_state_on_exit = true; bool create_save_state_backups = DEFAULT_SAVE_STATE_BACKUPS; bool compress_save_states = DEFAULT_SAVE_STATE_COMPRESSION; diff --git a/src/util/input_manager.cpp b/src/util/input_manager.cpp index 4cffbbcbf..507650495 100644 --- a/src/util/input_manager.cpp +++ b/src/util/input_manager.cpp @@ -113,6 +113,7 @@ static void GenerateRelativeMouseEvents(); static bool DoEventHook(InputBindingKey key, float value); static bool PreprocessEvent(InputBindingKey key, float value, GenericInputBinding generic_key); +static bool ProcessEvent(InputBindingKey key, float value, bool skip_button_handlers); static void LoadMacroButtonConfig(SettingsInterface& si, const std::string& section, u32 pad, const Controller::ControllerInfo* cinfo); @@ -844,7 +845,11 @@ bool InputManager::InvokeEvents(InputBindingKey key, float value, GenericInputBi // If imgui ate the event, don't fire our handlers. const bool skip_button_handlers = PreprocessEvent(key, value, generic_key); + return ProcessEvent(key, value, skip_button_handlers); +} +bool InputManager::ProcessEvent(InputBindingKey key, float value, bool skip_button_handlers) +{ // find all the bindings associated with this key const InputBindingKey masked_key = key.MaskDirection(); const auto range = s_binding_map.equal_range(masked_key); @@ -856,6 +861,7 @@ bool InputManager::InvokeEvents(InputBindingKey key, float value, GenericInputBi for (auto it = range.first; it != range.second; ++it) { InputBinding* binding = it->second.get(); + // find the key which matches us for (u32 i = 0; i < binding->num_keys; i++) { @@ -865,6 +871,7 @@ bool InputManager::InvokeEvents(InputBindingKey key, float value, GenericInputBi const u8 bit = static_cast(1) << i; const bool negative = binding->keys[i].modifier == InputModifier::Negate; const bool new_state = (negative ? (value < 0.0f) : (value > 0.0f)); + float value_to_pass = 0.0f; switch (binding->keys[i].modifier) {