mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Add mappable devkit-only L2/L3/R2/R3 controls.
Can be used to bring up a debug menu in Castlevania: SOTN, see issue #17464 Could also be used in PPSSPP-specific homebrew, in theory. Fixes #17464
This commit is contained in:
parent
1935bba789
commit
2613745cdd
@ -50,6 +50,11 @@ const std::unordered_map<std::string, uint32_t> buttonLookup = {
|
||||
{ "forward", CTRL_FORWARD },
|
||||
{ "back", CTRL_BACK },
|
||||
{ "playpause", CTRL_PLAYPAUSE },
|
||||
// Obscure unmapped keys, see issue #17464
|
||||
{ "l2", CTRL_L2 },
|
||||
{ "l3", CTRL_L3 },
|
||||
{ "r2", CTRL_R2 },
|
||||
{ "r3", CTRL_R3 },
|
||||
};
|
||||
|
||||
struct WebSocketInputState : public DebuggerSubscriber {
|
||||
|
@ -55,10 +55,16 @@ const int CTRL_STICK_RIGHT = 1;
|
||||
#define CTRL_BACK 0x20000000
|
||||
#define CTRL_PLAYPAUSE 0x40000000
|
||||
|
||||
// Obscure extra keys that were never mapped to hardware, but can be used to bring up the debug menu in SOTN, see issue #17464
|
||||
#define CTRL_L3 0x0002
|
||||
#define CTRL_R3 0x0004
|
||||
#define CTRL_L2 0x0400
|
||||
#define CTRL_R2 0x0800
|
||||
|
||||
#define CTRL_MASK_DPAD (CTRL_UP | CTRL_DOWN | CTRL_LEFT | CTRL_RIGHT)
|
||||
#define CTRL_MASK_ACTION (CTRL_SQUARE | CTRL_TRIANGLE | CTRL_CIRCLE | CTRL_CROSS)
|
||||
#define CTRL_MASK_TRIGGER (CTRL_LTRIGGER | CTRL_RTRIGGER)
|
||||
#define CTRL_MASK_USER (CTRL_MASK_DPAD | CTRL_MASK_ACTION | CTRL_START | CTRL_SELECT | CTRL_MASK_TRIGGER | CTRL_HOME | CTRL_HOLD | CTRL_WLAN | CTRL_REMOTE_HOLD | CTRL_VOL_UP | CTRL_VOL_DOWN | CTRL_SCREEN | CTRL_NOTE)
|
||||
#define CTRL_MASK_USER (CTRL_MASK_DPAD | CTRL_MASK_ACTION | CTRL_START | CTRL_SELECT | CTRL_MASK_TRIGGER | CTRL_HOME | CTRL_HOLD | CTRL_WLAN | CTRL_REMOTE_HOLD | CTRL_VOL_UP | CTRL_VOL_DOWN | CTRL_SCREEN | CTRL_NOTE | CTRL_L2 | CTRL_L3 | CTRL_R2 | CTRL_R3)
|
||||
|
||||
void __CtrlInit();
|
||||
void __CtrlDoState(PointerWrap &p);
|
||||
|
@ -474,6 +474,10 @@ const KeyMap_IntStrPair psp_button_names[] = {
|
||||
{CTRL_VOL_DOWN, "Vol -"},
|
||||
{CTRL_SCREEN, "Screen"},
|
||||
{CTRL_NOTE, "Note"},
|
||||
{CTRL_L2, "Dev-kit L2"},
|
||||
{CTRL_L3, "Dev-kit L3"},
|
||||
{CTRL_R2, "Dev-kit R2"},
|
||||
{CTRL_R3, "Dev-kit R3"},
|
||||
};
|
||||
|
||||
// key here can be other things than InputKeyCode.
|
||||
|
Loading…
Reference in New Issue
Block a user