mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
OpenXR - Better dialog support
This commit is contained in:
parent
319d434acc
commit
f92990a002
3 changed files with 12 additions and 5 deletions
|
@ -309,7 +309,7 @@ void UpdateVRInput(bool(*NativeAxis)(const AxisInput &axis), bool(*NativeKey)(co
|
|||
}
|
||||
|
||||
//mouse cursor
|
||||
if ((mouseController >= 0) && (appMode == VR_MENU_MODE)) {
|
||||
if ((mouseController >= 0) && ((appMode == VR_DIALOG_MODE) || (appMode == VR_MENU_MODE))) {
|
||||
//get position on screen
|
||||
XrPosef pose = IN_VRGetPose(mouseController);
|
||||
XrVector3f angles = XrQuaternionf_ToEulerAngles(pose.orientation);
|
||||
|
@ -379,8 +379,8 @@ bool UpdateVRKeys(const KeyInput &key) {
|
|||
}
|
||||
}
|
||||
|
||||
//block keys in the menus
|
||||
if (appMode == VR_MENU_MODE) {
|
||||
//block keys in the UI
|
||||
if ((appMode == VR_DIALOG_MODE) || (appMode == VR_MENU_MODE)) {
|
||||
switch (key.keyCode) {
|
||||
case NKCODE_BACK:
|
||||
case NKCODE_EXT_MOUSEWHEEL_UP:
|
||||
|
@ -608,7 +608,9 @@ bool StartVRRender() {
|
|||
}
|
||||
|
||||
// Decide if the scene is 3D or not
|
||||
if (g_Config.bEnableVR && !pspKeys[CTRL_SCREEN] && (vr3DGeometryCount > 15)) {
|
||||
if ((appMode == VR_DIALOG_MODE) || (appMode == VR_MENU_MODE)) {
|
||||
VR_SetConfig(VR_CONFIG_MODE, VR_MODE_MONO_SCREEN);
|
||||
} else if (g_Config.bEnableVR && !pspKeys[CTRL_SCREEN] && (vr3DGeometryCount > 15)) {
|
||||
bool stereo = hasUnitScale && g_Config.bEnableStereo;
|
||||
VR_SetConfig(VR_CONFIG_MODE, stereo ? VR_MODE_STEREO_6DOF : VR_MODE_MONO_6DOF);
|
||||
} else {
|
||||
|
|
|
@ -19,6 +19,7 @@ enum VRCompatFlag {
|
|||
|
||||
enum VRAppMode {
|
||||
VR_CONTROLL_MAPPING_MODE,
|
||||
VR_DIALOG_MODE,
|
||||
VR_GAME_MODE,
|
||||
VR_MENU_MODE,
|
||||
};
|
||||
|
|
|
@ -1477,7 +1477,11 @@ void EmuScreen::render() {
|
|||
renderUI();
|
||||
}
|
||||
|
||||
SetVRAppMode(VRAppMode::VR_GAME_MODE);
|
||||
if (chatMenu_ && (chatMenu_->GetVisibility() == UI::V_VISIBLE)) {
|
||||
SetVRAppMode(VRAppMode::VR_DIALOG_MODE);
|
||||
} else {
|
||||
SetVRAppMode(screenManager()->topScreen() == this ? VRAppMode::VR_GAME_MODE : VRAppMode::VR_DIALOG_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
bool EmuScreen::hasVisibleUI() {
|
||||
|
|
Loading…
Add table
Reference in a new issue