mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Merge pull request #15494 from iota97/InternalRotationBind
Add key bind to hotswap internal screen rotation
This commit is contained in:
commit
a8ddde5a27
@ -395,6 +395,11 @@ const KeyMap_IntStrPair psp_button_names[] = {
|
||||
{VIRTKEY_ANALOG_ROTATE_CW, "Rotate Analog (CW)"},
|
||||
{VIRTKEY_ANALOG_ROTATE_CCW, "Rotate Analog (CCW)"},
|
||||
|
||||
{VIRTKEY_SCREEN_ROTATION_VERTICAL, "Display Portrait"},
|
||||
{VIRTKEY_SCREEN_ROTATION_VERTICAL180, "Display Portrait Reversed"},
|
||||
{VIRTKEY_SCREEN_ROTATION_HORIZONTAL, "Display Landscape"},
|
||||
{VIRTKEY_SCREEN_ROTATION_HORIZONTAL180, "Display Landscape Reversed"},
|
||||
|
||||
{CTRL_HOME, "Home"},
|
||||
{CTRL_HOLD, "Hold"},
|
||||
{CTRL_WLAN, "Wlan"},
|
||||
|
@ -63,6 +63,10 @@ enum {
|
||||
VIRTKEY_OPENCHAT = 0x4000001D,
|
||||
VIRTKEY_ANALOG_ROTATE_CW = 0x4000001E,
|
||||
VIRTKEY_ANALOG_ROTATE_CCW = 0x4000001F,
|
||||
VIRTKEY_SCREEN_ROTATION_VERTICAL = 0x40000020,
|
||||
VIRTKEY_SCREEN_ROTATION_VERTICAL180 = 0x40000021,
|
||||
VIRTKEY_SCREEN_ROTATION_HORIZONTAL = 0x40000022,
|
||||
VIRTKEY_SCREEN_ROTATION_HORIZONTAL180 = 0x40000023,
|
||||
VIRTKEY_LAST,
|
||||
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
|
||||
};
|
||||
|
@ -709,6 +709,18 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
case VIRTKEY_MUTE_TOGGLE:
|
||||
g_Config.bEnableSound = !g_Config.bEnableSound;
|
||||
break;
|
||||
case VIRTKEY_SCREEN_ROTATION_VERTICAL:
|
||||
g_Config.iInternalScreenRotation = ROTATION_LOCKED_VERTICAL;
|
||||
break;
|
||||
case VIRTKEY_SCREEN_ROTATION_VERTICAL180:
|
||||
g_Config.iInternalScreenRotation = ROTATION_LOCKED_VERTICAL180;
|
||||
break;
|
||||
case VIRTKEY_SCREEN_ROTATION_HORIZONTAL:
|
||||
g_Config.iInternalScreenRotation = ROTATION_LOCKED_HORIZONTAL;
|
||||
break;
|
||||
case VIRTKEY_SCREEN_ROTATION_HORIZONTAL180:
|
||||
g_Config.iInternalScreenRotation = ROTATION_LOCKED_HORIZONTAL180;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user