input: fastforward hotkey

This commit is contained in:
Anime 2025-03-19 16:15:41 +02:00
parent 5a17e983aa
commit dc2d0901e6
3 changed files with 5 additions and 0 deletions

View file

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

View file

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

View file

@ -8,6 +8,7 @@ const std::unordered_map<uHotkey*, std::function<void(void)>> HotkeySettings::s_
{&s_cfgHotkeys.toggleFullscreenAlt, [](void) { s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen()); }},
{&s_cfgHotkeys.exitFullscreen, [](void) { s_mainWindow->ShowFullScreen(false); }},
{&s_cfgHotkeys.takeScreenshot, [](void) { g_window_info.has_screenshot_request = true; }},
{&s_cfgHotkeys.toggleFastForward, [](void) { ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1); }},
};
struct HotkeyEntry
@ -34,6 +35,7 @@ HotkeySettings::HotkeySettings(wxWindow* parent)
CreateHotkey("Toggle fullscreen", s_cfgHotkeys.toggleFullscreen);
CreateHotkey("Take screenshot", s_cfgHotkeys.takeScreenshot);
CreateHotkey("Toggle fast-forward", s_cfgHotkeys.toggleFastForward);
m_sizer->SetSizeHints(this);
}