overlays: add settings for screenshot and recording hints
Some checks failed
Generate Translation Template / Generate Translation Template (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, arch -X86_64 .ci/build-mac.sh, Intel) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Has been cancelled
Build RPCS3 / RPCS3 FreeBSD (push) Has been cancelled

This commit is contained in:
Megamouse 2025-08-19 20:17:22 +02:00
parent d087c86243
commit d72f95677e
8 changed files with 55 additions and 28 deletions

View file

@ -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) if (g_cfg.misc.show_pressure_intensity_toggle_hint)
{ {
const std::string player_id_string = std::to_string(player_id + 1); const std::string player_id_string = std::to_string(player_id + 1);
if (m_pressure_intensity_toggled) 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,
rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_PRESSURE_INTENSITY_TOGGLED_ON, player_id_string.c_str()), 3'000'000); 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);
}
} }
} }
} }
@ -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) if (g_cfg.misc.show_analog_limiter_toggle_hint)
{ {
const std::string player_id_string = std::to_string(player_id + 1); const std::string player_id_string = std::to_string(player_id + 1);
if (m_analog_limiter_toggled) 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,
rsx::overlays::queue_message(get_localized_string(localized_string_id::RSX_OVERLAYS_ANALOG_LIMITER_TOGGLED_ON, player_id_string.c_str()), 3'000'000); 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);
}
} }
} }
} }

View file

@ -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_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_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_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::_bool use_native_interface{ this, "Use native user interface", true };
cfg::string gdb_server{ this, "GDB Server", "127.0.0.1:2345" }; cfg::string gdb_server{ this, "GDB Server", "127.0.0.1:2345" };
cfg::_bool silence_all_logs{ this, "Silence All Logs", false, true }; cfg::_bool silence_all_logs{ this, "Silence All Logs", false, true };

View file

@ -184,6 +184,7 @@ enum class emu_settings_type
ShowPressureIntensityToggleHint, ShowPressureIntensityToggleHint,
ShowAnalogLimiterToggleHint, ShowAnalogLimiterToggleHint,
ShowMouseAndKeyboardToggleHint, ShowMouseAndKeyboardToggleHint,
ShowCaptureHints,
WindowTitleFormat, WindowTitleFormat,
PauseDuringHomeMenu, PauseDuringHomeMenu,
EnableGamemode, EnableGamemode,
@ -386,6 +387,7 @@ inline static const std::map<emu_settings_type, cfg_location> settings_location
{ emu_settings_type::ShowPressureIntensityToggleHint, { "Miscellaneous", "Show pressure intensity toggle hint"}}, { emu_settings_type::ShowPressureIntensityToggleHint, { "Miscellaneous", "Show pressure intensity toggle hint"}},
{ emu_settings_type::ShowAnalogLimiterToggleHint, { "Miscellaneous", "Show analog limiter 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::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::SilenceAllLogs, { "Miscellaneous", "Silence All Logs" }},
{ emu_settings_type::WindowTitleFormat, { "Miscellaneous", "Window Title Format" }}, { emu_settings_type::WindowTitleFormat, { "Miscellaneous", "Window Title Format" }},
{ emu_settings_type::PauseDuringHomeMenu, { "Miscellaneous", "Pause Emulation During Home Menu" }}, { emu_settings_type::PauseDuringHomeMenu, { "Miscellaneous", "Pause Emulation During Home Menu" }},

View file

@ -434,10 +434,13 @@ void gs_frame::toggle_recording()
QApplication::beep(); QApplication::beep();
} }
if (g_cfg.misc.show_capture_hints)
{
ensure(m_video_encoder->path().starts_with(fs::get_config_dir())); 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 / 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()); rsx::overlays::queue_message(tr("Recording saved: %0").arg(QString::fromStdString(shortpath)).toStdString());
} }
}
else else
{ {
m_video_encoder->stop(); m_video_encoder->stop();
@ -507,8 +510,12 @@ void gs_frame::toggle_recording()
m_video_encoder->encode(); m_video_encoder->encode();
if (m_video_encoder->has_error) if (m_video_encoder->has_error)
{
if (g_cfg.misc.show_capture_hints)
{ {
rsx::overlays::queue_message(tr("Recording not possible").toStdString()); rsx::overlays::queue_message(tr("Recording not possible").toStdString());
}
m_video_encoder->stop(); m_video_encoder->stop();
return; return;
} }
@ -516,7 +523,12 @@ void gs_frame::toggle_recording()
if (!video_provider.set_video_sink(m_video_encoder, recording_mode::rpcs3)) 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."); gui_log.warning("The video provider could not set the video sink. A sink with higher priority must have been set.");
if (g_cfg.misc.show_capture_hints)
{
rsx::overlays::queue_message(tr("Recording not possible").toStdString()); rsx::overlays::queue_message(tr("Recording not possible").toStdString());
}
m_video_encoder->stop(); m_video_encoder->stop();
return; return;
} }
@ -525,9 +537,12 @@ void gs_frame::toggle_recording()
g_recording_mode = recording_mode::rpcs3; g_recording_mode = recording_mode::rpcs3;
if (g_cfg.misc.show_capture_hints)
{
rsx::overlays::queue_message(tr("Recording started").toStdString()); rsx::overlays::queue_message(tr("Recording started").toStdString());
} }
} }
}
void gs_frame::toggle_mouselock() void gs_frame::toggle_mouselock()
{ {
@ -1043,9 +1058,12 @@ void gs_frame::take_screenshot(std::vector<u8>&& data, u32 sshot_width, u32 ssho
} }
}); });
if (g_cfg.misc.show_capture_hints)
{
ensure(filename.starts_with(fs::get_config_dir())); ensure(filename.starts_with(fs::get_config_dir()));
const std::string shortpath = filename.substr(fs::get_config_dir().size() - 1); // -1 for / 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()); rsx::overlays::queue_message(tr("Screenshot saved: %0").arg(QString::fromStdString(shortpath)).toStdString());
}
return; return;
}, },

View file

@ -1873,6 +1873,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
m_emu_settings->EnhanceCheckBox(ui->showMouseAndKeyboardToggleHint, emu_settings_type::ShowMouseAndKeyboardToggleHint); m_emu_settings->EnhanceCheckBox(ui->showMouseAndKeyboardToggleHint, emu_settings_type::ShowMouseAndKeyboardToggleHint);
SubscribeTooltip(ui->showMouseAndKeyboardToggleHint, tooltips.settings.show_mouse_and_keyboard_toggle_hint); 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); m_emu_settings->EnhanceCheckBox(ui->pauseDuringHomeMenu, emu_settings_type::PauseDuringHomeMenu);
SubscribeTooltip(ui->pauseDuringHomeMenu, tooltips.settings.pause_during_home_menu); SubscribeTooltip(ui->pauseDuringHomeMenu, tooltips.settings.pause_during_home_menu);

View file

@ -3008,6 +3008,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="showCaptureHints">
<property name="text">
<string>Show capture hints</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="startGameFullscreen"> <widget class="QCheckBox" name="startGameFullscreen">
<property name="text"> <property name="text">

View file

@ -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_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_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_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 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."); 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.");

View file

@ -2,6 +2,7 @@
#include "video_provider.h" #include "video_provider.h"
#include "Emu/RSX/Overlays/overlay_message.h" #include "Emu/RSX/Overlays/overlay_message.h"
#include "Emu/Cell/timers.hpp" #include "Emu/Cell/timers.hpp"
#include "Emu/system_config.h"
extern "C" extern "C"
{ {
@ -89,8 +90,12 @@ namespace utils
if (!m_video_sink || m_video_sink->has_error) if (!m_video_sink || m_video_sink->has_error)
{ {
g_recording_mode = recording_mode::stopped; g_recording_mode = recording_mode::stopped;
if (g_cfg.misc.show_capture_hints)
{
rsx::overlays::queue_message(localized_string_id::RECORDING_ABORTED); rsx::overlays::queue_message(localized_string_id::RECORDING_ABORTED);
} }
}
if (g_recording_mode == recording_mode::stopped) if (g_recording_mode == recording_mode::stopped)
{ {