mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 20:04:31 +01:00
Get rid of remaining legacy key mappings. Make Pause and F3 mappable, add default mappings. You may need to manually map these if you have an old ppsspp.ini.
This commit is contained in:
1 parent
d5f4933b44
commit
ab1b7e7288
6 files changed
+39
-47
No files matched your search
+22
-19
@@ -183,10 +183,30 @@ void EmuScreen::touch(const TouchInput &touch) {
|
||||
}
|
||||
|
||||
void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
|
||||
switch (virtualKeyCode) {
|
||||
case VIRTKEY_UNTHROTTLE:
|
||||
PSP_CoreParameter().unthrottle = true;
|
||||
break;
|
||||
case VIRTKEY_SPEED_TOGGLE:
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
osm.Show(s->T("fixed", "Speed: fixed"), 1.0);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
PSP_CoreParameter().fpsLimit = 2;
|
||||
osm.Show(s->T("unlimited", "Speed: unlimited!"), 1.0, 0x50E0FF);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 2) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
osm.Show(s->T("standard", "Speed: standard"), 1.0);
|
||||
}
|
||||
break;
|
||||
case VIRTKEY_PAUSE:
|
||||
fbo_unbind();
|
||||
screenManager()->push(new PauseScreen());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,8 +340,6 @@ void EmuScreen::update(InputState &input) {
|
||||
}
|
||||
#endif
|
||||
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
|
||||
// Apply tilt to left stick
|
||||
if (g_Config.bAccelerometerToAnalogHoriz) {
|
||||
// TODO: Deadzone, etc.
|
||||
@@ -339,23 +357,8 @@ void EmuScreen::update(InputState &input) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
}
|
||||
|
||||
//Toggle between 3 different states of fpsLimit
|
||||
if (input.pad_buttons_down & PAD_BUTTON_LEFT_THUMB) {
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
osm.Show(s->T("fixed", "Speed: fixed"), 1.0);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 1) {
|
||||
PSP_CoreParameter().fpsLimit = 2;
|
||||
osm.Show(s->T("unlimited", "Speed: unlimited!"), 1.0, 0x50E0FF);
|
||||
}
|
||||
else if (PSP_CoreParameter().fpsLimit == 2) {
|
||||
PSP_CoreParameter().fpsLimit = 0;
|
||||
osm.Show(s->T("standard", "Speed: standard"), 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (input.pad_buttons_down & (PAD_BUTTON_MENU | PAD_BUTTON_BACK | PAD_BUTTON_RIGHT_THUMB)) {
|
||||
// This is still here to support the iOS on screen back button.
|
||||
if (input.pad_buttons_down & (PAD_BUTTON_BACK)) {
|
||||
fbo_unbind();
|
||||
screenManager()->push(new PauseScreen());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user