input: fastforward hotkey

This commit is contained in:
Anime 2025-03-30 15:20:41 +03:00
parent 86424d907e
commit d505ca1ef9
3 changed files with 5 additions and 0 deletions

View file

@ -350,6 +350,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
hotkeys.toggleFullscreen = xml_hotkeys.get("ToggleFullscreen", sHotkeyCfg{uKeyboardHotkey{WXK_F11}}); hotkeys.toggleFullscreen = xml_hotkeys.get("ToggleFullscreen", sHotkeyCfg{uKeyboardHotkey{WXK_F11}});
hotkeys.toggleFullscreenAlt = xml_hotkeys.get("ToggleFullscreenAlt", sHotkeyCfg{uKeyboardHotkey{WXK_CONTROL_M, true}}); // ALT+ENTER hotkeys.toggleFullscreenAlt = xml_hotkeys.get("ToggleFullscreenAlt", sHotkeyCfg{uKeyboardHotkey{WXK_CONTROL_M, true}}); // ALT+ENTER
hotkeys.takeScreenshot = xml_hotkeys.get("TakeScreenshot", sHotkeyCfg{uKeyboardHotkey{WXK_F12}}); hotkeys.takeScreenshot = xml_hotkeys.get("TakeScreenshot", sHotkeyCfg{uKeyboardHotkey{WXK_F12}});
hotkeys.toggleFastForward = xml_hotkeys.get("ToggleFastForward", sHotkeyCfg{});
// emulatedusbdevices // emulatedusbdevices
auto usbdevices = parser.get("EmulatedUsbDevices"); auto usbdevices = parser.get("EmulatedUsbDevices");
@ -559,6 +560,7 @@ void CemuConfig::Save(XMLConfigParser& parser)
xml_hotkeys.set("ToggleFullscreen", hotkeys.toggleFullscreen); xml_hotkeys.set("ToggleFullscreen", hotkeys.toggleFullscreen);
xml_hotkeys.set("ToggleFullscreenAlt", hotkeys.toggleFullscreenAlt); xml_hotkeys.set("ToggleFullscreenAlt", hotkeys.toggleFullscreenAlt);
xml_hotkeys.set("TakeScreenshot", hotkeys.takeScreenshot); xml_hotkeys.set("TakeScreenshot", hotkeys.takeScreenshot);
xml_hotkeys.set("ToggleFastForward", hotkeys.toggleFastForward);
// emulated usb devices // emulated usb devices
auto usbdevices = config.set("EmulatedUsbDevices"); auto usbdevices = config.set("EmulatedUsbDevices");

View file

@ -548,6 +548,7 @@ struct CemuConfig
sHotkeyCfg toggleFullscreenAlt; sHotkeyCfg toggleFullscreenAlt;
sHotkeyCfg exitFullscreen; sHotkeyCfg exitFullscreen;
sHotkeyCfg takeScreenshot; sHotkeyCfg takeScreenshot;
sHotkeyCfg toggleFastForward;
} hotkeys{}; } hotkeys{};
// debug // debug

View file

@ -14,6 +14,7 @@ const std::unordered_map<sHotkeyCfg*, std::function<void(void)>> HotkeySettings:
{&s_cfgHotkeys.toggleFullscreenAlt, [](void) { s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen()); }}, {&s_cfgHotkeys.toggleFullscreenAlt, [](void) { s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen()); }},
{&s_cfgHotkeys.exitFullscreen, [](void) { s_mainWindow->ShowFullScreen(false); }}, {&s_cfgHotkeys.exitFullscreen, [](void) { s_mainWindow->ShowFullScreen(false); }},
{&s_cfgHotkeys.takeScreenshot, [](void) { g_window_info.has_screenshot_request = true; }}, {&s_cfgHotkeys.takeScreenshot, [](void) { g_window_info.has_screenshot_request = true; }},
{&s_cfgHotkeys.toggleFastForward, [](void) { ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1); }},
}; };
struct HotkeyEntry struct HotkeyEntry
@ -62,6 +63,7 @@ HotkeySettings::HotkeySettings(wxWindow* parent)
/* hotkeys */ /* hotkeys */
CreateHotkeyRow("Toggle fullscreen", s_cfgHotkeys.toggleFullscreen); CreateHotkeyRow("Toggle fullscreen", s_cfgHotkeys.toggleFullscreen);
CreateHotkeyRow("Take screenshot", s_cfgHotkeys.takeScreenshot); CreateHotkeyRow("Take screenshot", s_cfgHotkeys.takeScreenshot);
CreateHotkeyRow("Toggle fast-forward", s_cfgHotkeys.toggleFastForward);
m_controllerTimer = new wxTimer(this); m_controllerTimer = new wxTimer(this);
Bind(wxEVT_TIMER, &HotkeySettings::OnControllerTimer, this); Bind(wxEVT_TIMER, &HotkeySettings::OnControllerTimer, this);