diff --git a/rpcs3/Emu/Io/pad_types.cpp b/rpcs3/Emu/Io/pad_types.cpp index 428e0d6cea..9c67cc20f5 100644 --- a/rpcs3/Emu/Io/pad_types.cpp +++ b/rpcs3/Emu/Io/pad_types.cpp @@ -195,14 +195,9 @@ bool Pad::get_pressure_intensity_button_active(bool is_toggle_mode, u32 player_i if (g_cfg.misc.show_pressure_intensity_toggle_hint) { const std::string player_id_string = std::to_string(player_id + 1); - if (m_pressure_intensity_toggled) - { - rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_PRESSURE_INTENSITY_TOGGLED_ON, player_id_string.c_str()), 3'000'000); - } - else - { - rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_PRESSURE_INTENSITY_TOGGLED_OFF, player_id_string.c_str()), 3'000'000); - } + rsx::overlays::queue_message(get_localized_string( + m_pressure_intensity_toggled ? localized_string_id::RSX_OVERLAYS_PRESSURE_INTENSITY_TOGGLED_ON : localized_string_id::RSX_OVERLAYS_PRESSURE_INTENSITY_TOGGLED_OFF, + player_id_string.c_str()), 3'000'000); } } } @@ -235,14 +230,9 @@ bool Pad::get_analog_limiter_button_active(bool is_toggle_mode, u32 player_id) if (g_cfg.misc.show_analog_limiter_toggle_hint) { const std::string player_id_string = std::to_string(player_id + 1); - if (m_analog_limiter_toggled) - { - rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_ANALOG_LIMITER_TOGGLED_ON, player_id_string.c_str()), 3'000'000); - } - else - { - rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_ANALOG_LIMITER_TOGGLED_OFF, player_id_string.c_str()), 3'000'000); - } + rsx::overlays::queue_message(get_localized_string( + m_analog_limiter_toggled ? localized_string_id::RSX_OVERLAYS_ANALOG_LIMITER_TOGGLED_ON : localized_string_id::RSX_OVERLAYS_ANALOG_LIMITER_TOGGLED_OFF, + player_id_string.c_str()), 3'000'000); } } } diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index 2b35e70cb9..c62e56b491 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -353,6 +353,7 @@ struct cfg_root : cfg::node cfg::_bool show_pressure_intensity_toggle_hint{ this, "Show pressure intensity toggle hint", true, true }; cfg::_bool show_analog_limiter_toggle_hint{ this, "Show analog limiter toggle hint", true, true }; cfg::_bool show_mouse_and_keyboard_toggle_hint{ this, "Show mouse and keyboard toggle hint", true, true }; + cfg::_bool show_capture_hints{ this, "Show capture hints", true, true }; cfg::_bool use_native_interface{ this, "Use native user interface", true }; cfg::string gdb_server{ this, "GDB Server", "127.0.0.1:2345" }; cfg::_bool silence_all_logs{ this, "Silence All Logs", false, true }; diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index 24e7b2fcdd..d0f7019c8a 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -184,6 +184,7 @@ enum class emu_settings_type ShowPressureIntensityToggleHint, ShowAnalogLimiterToggleHint, ShowMouseAndKeyboardToggleHint, + ShowCaptureHints, WindowTitleFormat, PauseDuringHomeMenu, EnableGamemode, @@ -386,10 +387,11 @@ inline static const std::map settings_location { emu_settings_type::ShowPressureIntensityToggleHint, { "Miscellaneous", "Show pressure intensity toggle hint"}}, { emu_settings_type::ShowAnalogLimiterToggleHint, { "Miscellaneous", "Show analog limiter toggle hint"}}, { emu_settings_type::ShowMouseAndKeyboardToggleHint, { "Miscellaneous", "Show mouse and keyboard toggle hint"}}, + { emu_settings_type::ShowCaptureHints, { "Miscellaneous", "Show capture hints" }}, { emu_settings_type::SilenceAllLogs, { "Miscellaneous", "Silence All Logs" }}, { emu_settings_type::WindowTitleFormat, { "Miscellaneous", "Window Title Format" }}, { emu_settings_type::PauseDuringHomeMenu, { "Miscellaneous", "Pause Emulation During Home Menu" }}, - { emu_settings_type::EnableGamemode, { "Miscellaneous", "Enable GameMode" }}, + { emu_settings_type::EnableGamemode, { "Miscellaneous", "Enable GameMode" }}, // Networking { emu_settings_type::InternetStatus, { "Net", "Internet enabled"}}, diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index 8cd2a2bc9b..ee50a4fb05 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -434,9 +434,12 @@ void gs_frame::toggle_recording() QApplication::beep(); } - ensure(m_video_encoder->path().starts_with(fs::get_config_dir())); - const std::string shortpath = m_video_encoder->path().substr(fs::get_config_dir().size() - 1); // -1 for / - rsx::overlays::queue_message(tr("Recording saved: %0").arg(QString::fromStdString(shortpath)).toStdString()); + if (g_cfg.misc.show_capture_hints) + { + ensure(m_video_encoder->path().starts_with(fs::get_config_dir())); + const std::string shortpath = m_video_encoder->path().substr(fs::get_config_dir().size() - 1); // -1 for / + rsx::overlays::queue_message(tr("Recording saved: %0").arg(QString::fromStdString(shortpath)).toStdString()); + } } else { @@ -508,7 +511,11 @@ void gs_frame::toggle_recording() if (m_video_encoder->has_error) { - rsx::overlays::queue_message(tr("Recording not possible").toStdString()); + if (g_cfg.misc.show_capture_hints) + { + rsx::overlays::queue_message(tr("Recording not possible").toStdString()); + } + m_video_encoder->stop(); return; } @@ -516,7 +523,12 @@ void gs_frame::toggle_recording() if (!video_provider.set_video_sink(m_video_encoder, recording_mode::rpcs3)) { gui_log.warning("The video provider could not set the video sink. A sink with higher priority must have been set."); - rsx::overlays::queue_message(tr("Recording not possible").toStdString()); + + if (g_cfg.misc.show_capture_hints) + { + rsx::overlays::queue_message(tr("Recording not possible").toStdString()); + } + m_video_encoder->stop(); return; } @@ -525,7 +537,10 @@ void gs_frame::toggle_recording() g_recording_mode = recording_mode::rpcs3; - rsx::overlays::queue_message(tr("Recording started").toStdString()); + if (g_cfg.misc.show_capture_hints) + { + rsx::overlays::queue_message(tr("Recording started").toStdString()); + } } } @@ -1043,9 +1058,12 @@ void gs_frame::take_screenshot(std::vector&& data, u32 sshot_width, u32 ssho } }); - ensure(filename.starts_with(fs::get_config_dir())); - const std::string shortpath = filename.substr(fs::get_config_dir().size() - 1); // -1 for / - rsx::overlays::queue_message(tr("Screenshot saved: %0").arg(QString::fromStdString(shortpath)).toStdString()); + if (g_cfg.misc.show_capture_hints) + { + ensure(filename.starts_with(fs::get_config_dir())); + const std::string shortpath = filename.substr(fs::get_config_dir().size() - 1); // -1 for / + rsx::overlays::queue_message(tr("Screenshot saved: %0").arg(QString::fromStdString(shortpath)).toStdString()); + } return; }, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 7569e5adca..ddb26e3144 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1873,6 +1873,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->showMouseAndKeyboardToggleHint, emu_settings_type::ShowMouseAndKeyboardToggleHint); SubscribeTooltip(ui->showMouseAndKeyboardToggleHint, tooltips.settings.show_mouse_and_keyboard_toggle_hint); + m_emu_settings->EnhanceCheckBox(ui->showCaptureHints, emu_settings_type::ShowCaptureHints); + SubscribeTooltip(ui->showCaptureHints, tooltips.settings.show_capture_hints); + m_emu_settings->EnhanceCheckBox(ui->pauseDuringHomeMenu, emu_settings_type::PauseDuringHomeMenu); SubscribeTooltip(ui->pauseDuringHomeMenu, tooltips.settings.pause_during_home_menu); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index f13b8344cd..4ebc9bb8e8 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -3008,6 +3008,13 @@ + + + + Show capture hints + + + @@ -3028,7 +3035,7 @@ false - false + false Enable GameMode diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index 0ef5ae76ec..cc2278d5ec 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -151,6 +151,7 @@ public: const QString show_pressure_intensity_toggle_hint = tr("Shows pressure intensity toggle hint using the native overlay."); const QString show_analog_limiter_toggle_hint = tr("Shows analog limiter toggle hint using the native overlay."); const QString show_mouse_and_keyboard_toggle_hint = tr("Shows mouse and keyboard toggle hint using the native overlay."); + const QString show_capture_hints = tr("Shows screenshot and recording hints using the native overlay."); const QString use_native_interface = tr("Enables use of native HUD within the game window that can interact with game controllers.\nWhen disabled, regular Qt dialogs are used instead.\nCurrently, the on-screen keyboard only supports the English key layout."); const QString pause_during_home_menu = tr("When enabled, opening the home menu will also pause emulation.\nWhile most games pause themselves while the home menu is shown, some do not.\nIn that case it can be helpful to pause the emulation whenever the home menu is open."); diff --git a/rpcs3/util/video_provider.cpp b/rpcs3/util/video_provider.cpp index 82f133b91e..fe305c11de 100644 --- a/rpcs3/util/video_provider.cpp +++ b/rpcs3/util/video_provider.cpp @@ -2,6 +2,7 @@ #include "video_provider.h" #include "Emu/RSX/Overlays/overlay_message.h" #include "Emu/Cell/timers.hpp" +#include "Emu/system_config.h" extern "C" { @@ -89,7 +90,11 @@ namespace utils if (!m_video_sink || m_video_sink->has_error) { g_recording_mode = recording_mode::stopped; - rsx::overlays::queue_message(localized_string_id::RECORDING_ABORTED); + + if (g_cfg.misc.show_capture_hints) + { + rsx::overlays::queue_message(localized_string_id::RECORDING_ABORTED); + } } if (g_recording_mode == recording_mode::stopped)