MCPcopy Create free account
hub / github.com/RetroAchievements/RALibretro / toggleFastForwarding

Method toggleFastForwarding

src/Application.cpp:2738–2766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2736}
2737
2738void Application::toggleFastForwarding(unsigned extra)
2739{
2740 // get the current fast forward selection
2741 MENUITEMINFO info;
2742 memset(&info, 0, sizeof(info));
2743 info.cbSize = sizeof(info);
2744 info.fMask = MIIM_STATE;
2745 GetMenuItemInfo(_menu, IDM_TURBO_GAME, false, &info);
2746 const bool checked = (info.fState == MFS_CHECKED);
2747
2748 switch (extra)
2749 {
2750 case 0: // FF key released - restore to selection
2751 _config.setFastForwarding(checked);
2752 break;
2753
2754 case 1: // FF key pressed - switch to opposite of selection (but don't change selection)
2755 _config.setFastForwarding(!checked);
2756 break;
2757
2758 case 2: // FF toggle pressed - switch to opposite of selection (and change selection)
2759 _config.setFastForwarding(!checked);
2760 info.fState = checked ? MFS_UNCHECKED : MFS_CHECKED;
2761 SetMenuItemInfo(_menu, IDM_TURBO_GAME, false, &info);
2762 break;
2763 }
2764
2765 updateSpeedIndicator();
2766}
2767
2768void Application::updateSpeedIndicator()
2769{

Callers

nothing calls this directly

Calls 1

setFastForwardingMethod · 0.45

Tested by

no test coverage detected