mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
UI: Add a virtkey for holding alt speed.
Can be used for slow motion or fast motion (esp. if unthrottle is too fast.)
This commit is contained in:
parent
9f307fd6e9
commit
dc840c077d
@ -645,6 +645,7 @@ const KeyMap_IntStrPair psp_button_names[] = {
|
||||
{VIRTKEY_RAPID_FIRE, "RapidFire"},
|
||||
{VIRTKEY_UNTHROTTLE, "Unthrottle"},
|
||||
{VIRTKEY_SPEED_TOGGLE, "SpeedToggle"},
|
||||
{VIRTKEY_SPEED_PRESS, "Speed toggle hold"},
|
||||
{VIRTKEY_PAUSE, "Pause"},
|
||||
#ifndef MOBILE_DEVICE
|
||||
{VIRTKEY_FRAME_ADVANCE, "Frame Advance"},
|
||||
|
@ -52,6 +52,7 @@ enum {
|
||||
VIRTKEY_DEVMENU = 0x40000014,
|
||||
VIRTKEY_FRAME_ADVANCE = 0x40000015,
|
||||
VIRTKEY_RECORD = 0x40000016,
|
||||
VIRTKEY_SPEED_PRESS = 0x40000017,
|
||||
VIRTKEY_LAST,
|
||||
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
|
||||
};
|
||||
|
@ -474,13 +474,19 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
osm.Show(sc->T("fixed", "Speed: alternate"), 1.0);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
} else if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
osm.Show(sc->T("standard", "Speed: standard"), 1.0);
|
||||
}
|
||||
break;
|
||||
|
||||
case VIRTKEY_SPEED_PRESS:
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
osm.Show(sc->T("fixed", "Speed: alternate"), 1.0);
|
||||
}
|
||||
break;
|
||||
|
||||
case VIRTKEY_PAUSE:
|
||||
pauseTrigger_ = true;
|
||||
break;
|
||||
@ -580,11 +586,20 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
}
|
||||
|
||||
void EmuScreen::onVKeyUp(int virtualKeyCode) {
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
switch (virtualKeyCode) {
|
||||
case VIRTKEY_UNTHROTTLE:
|
||||
PSP_CoreParameter().unthrottle = false;
|
||||
break;
|
||||
|
||||
case VIRTKEY_SPEED_PRESS:
|
||||
if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
osm.Show(sc->T("standard", "Speed: standard"), 1.0);
|
||||
}
|
||||
break;
|
||||
|
||||
case VIRTKEY_AXIS_X_MIN:
|
||||
case VIRTKEY_AXIS_X_MAX:
|
||||
setVKeyAnalogX(CTRL_STICK_LEFT, VIRTKEY_AXIS_X_MIN, VIRTKEY_AXIS_X_MAX);
|
||||
|
Loading…
Reference in New Issue
Block a user