mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
OpenXR - Add new virtual key for camera adjust
This commit is contained in:
1 parent
92422160a0
commit
363f102cc5
3 files changed
+7
-2
No files matched your search
@@ -158,7 +158,7 @@ void UpdateVRInput(bool(*NativeKey)(const KeyInput &key), bool(*NativeTouch)(con
|
||||
std::vector<int> nativeKeys;
|
||||
if (KeyMap::KeyToPspButton(controllerIds[j], m.keycode, &nativeKeys)) {
|
||||
for (int& nativeKey : nativeKeys) {
|
||||
if (nativeKey == CTRL_HOLD) {
|
||||
if (nativeKey == VIRTKEY_VR_CAMERA_ADJUST) {
|
||||
cameraKey = true;
|
||||
break;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ void UpdateVRSpecialKeys(const KeyInput &key) {
|
||||
if (KeyMap::KeyToPspButton(key.deviceId, key.keyCode, &nativeKeys)) {
|
||||
for (int& nativeKey : nativeKeys) {
|
||||
// adjust camera parameters
|
||||
if (nativeKey == CTRL_HOLD) {
|
||||
if (nativeKey == VIRTKEY_VR_CAMERA_ADJUST) {
|
||||
VR_SetConfig(VR_CONFIG_CAMERA_CONTROL, key.flags & KEY_DOWN);
|
||||
}
|
||||
// force 2D rendering
|
||||
|
||||
@@ -399,10 +399,14 @@ const KeyMap_IntStrPair psp_button_names[] = {
|
||||
{VIRTKEY_ANALOG_ROTATE_CW, "Rotate Analog (CW)"},
|
||||
{VIRTKEY_ANALOG_ROTATE_CCW, "Rotate Analog (CCW)"},
|
||||
|
||||
#ifdef OPENXR
|
||||
{VIRTKEY_VR_CAMERA_ADJUST, "VR camera adjust"},
|
||||
#else
|
||||
{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"},
|
||||
#endif
|
||||
|
||||
{CTRL_HOME, "Home"},
|
||||
{CTRL_HOLD, "Hold"},
|
||||
|
||||
@@ -68,6 +68,7 @@ enum {
|
||||
VIRTKEY_SCREEN_ROTATION_HORIZONTAL = 0x40000022,
|
||||
VIRTKEY_SCREEN_ROTATION_HORIZONTAL180 = 0x40000023,
|
||||
VIRTKEY_SPEED_ANALOG = 0x40000024,
|
||||
VIRTKEY_VR_CAMERA_ADJUST = 0x40000025,
|
||||
VIRTKEY_LAST,
|
||||
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user