Add Reset as a mappable control

This commit is contained in:
Henrik Rydgård 2024-09-18 14:18:04 +02:00
parent c451b41b8b
commit a33839d220
4 changed files with 7 additions and 0 deletions

View File

@ -423,6 +423,7 @@ const KeyMap_IntStrPair psp_button_names[] = {
{VIRTKEY_SPEED_CUSTOM2, "Alt speed 2"},
{VIRTKEY_SPEED_ANALOG, "Analog speed"},
{VIRTKEY_PAUSE, "Pause"},
{VIRTKEY_RESET_EMULATION, "Reset"},
{VIRTKEY_FRAME_ADVANCE, "Frame Advance"},
#if !defined(MOBILE_DEVICE)
{VIRTKEY_RECORD, "Audio/Video Recording" },

View File

@ -76,6 +76,7 @@ enum {
VIRTKEY_EXIT_APP = 0x40000029,
VIRTKEY_TOGGLE_MOUSE = 0x40000030,
VIRTKEY_TOGGLE_TOUCH_CONTROLS = 0x40000031,
VIRTKEY_RESET_EMULATION = 0x40000032,
VIRTKEY_LAST,
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
};

View File

@ -750,6 +750,10 @@ void EmuScreen::onVKey(int virtualKeyCode, bool down) {
}
break;
case VIRTKEY_RESET_EMULATION:
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
break;
#ifndef MOBILE_DEVICE
case VIRTKEY_RECORD:
if (down) {

View File

@ -315,6 +315,7 @@ namespace CustomKeyData {
{ ImageID::invalid(), VIRTKEY_ANALOG_ROTATE_CW },
{ ImageID::invalid(), VIRTKEY_ANALOG_ROTATE_CCW },
{ ImageID::invalid(), VIRTKEY_PAUSE },
{ ImageID::invalid(), VIRTKEY_RESET_EMULATION },
{ ImageID::invalid(), VIRTKEY_DEVMENU },
#ifndef MOBILE_DEVICE
{ ImageID::invalid(), VIRTKEY_RECORD },