diff --git a/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c b/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c index c4b6fc7..ced50ed 100644 --- a/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c +++ b/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c @@ -72,6 +72,30 @@ bool ready_teleport; bool trigger_teleport; bool cinemamode; +extern ovrInputStateTrackedRemote leftTrackedRemoteState_old; +extern ovrInputStateTrackedRemote leftTrackedRemoteState_new; +extern ovrTracking leftRemoteTracking_new; + +extern ovrInputStateTrackedRemote rightTrackedRemoteState_old; +extern ovrInputStateTrackedRemote rightTrackedRemoteState_new; +extern ovrTracking rightRemoteTracking_new; + +extern ovrInputStateGamepad footTrackedRemoteState_old; +extern ovrInputStateGamepad footTrackedRemoteState_new; + + +extern ovrDeviceID controllerIDs[2]; + +extern float remote_movementSideways; +extern float remote_movementForward; +extern float remote_movementUp; +extern float positional_movementSideways; +extern float positional_movementForward; +extern float snapTurn; + +extern float cinemamodeYaw; +extern float cinemamodePitch; + #if !defined( EGL_OPENGL_ES3_BIT_KHR ) #define EGL_OPENGL_ES3_BIT_KHR 0x0040 #endif @@ -1049,6 +1073,8 @@ static void ovrApp_HandleVrModeChanges( ovrApp * app ) vrapi_SetPerfThread( app->Ovr, VRAPI_PERF_THREAD_TYPE_RENDERER, app->RenderThreadTid ); ALOGV( " vrapi_SetPerfThread( RENDERER, %d )", app->RenderThreadTid ); + + vrapi_SetExtraLatencyMode(app->Ovr, VRAPI_EXTRA_LATENCY_MODE_ON); } } } @@ -1557,6 +1583,12 @@ void QzDoom_FrameSetup() { //Use floor based tracking space vrapi_SetTrackingSpace(gAppState.Ovr, VRAPI_TRACKING_SPACE_LOCAL_FLOOR); + + //Ensure extra latency mode is enabled always + vrapi_SetExtraLatencyMode(gAppState.Ovr, VRAPI_EXTRA_LATENCY_MODE_ON); + + //Ensure we are running at configure "power" + vrapi_SetClockLevels( gAppState.Ovr, gAppState.CpuLevel, gAppState.GpuLevel ); } void QzDoom_processHaptics() {//Handle haptics diff --git a/Projects/Android/jni/QzDoom/VrInput.h b/Projects/Android/jni/QzDoom/VrInput.h index 2ec3fd8..c23826a 100644 --- a/Projects/Android/jni/QzDoom/VrInput.h +++ b/Projects/Android/jni/QzDoom/VrInput.h @@ -4,29 +4,7 @@ #include "VrCommon.h" -ovrInputStateTrackedRemote leftTrackedRemoteState_old; -ovrInputStateTrackedRemote leftTrackedRemoteState_new; -ovrTracking leftRemoteTracking_new; -ovrInputStateTrackedRemote rightTrackedRemoteState_old; -ovrInputStateTrackedRemote rightTrackedRemoteState_new; -ovrTracking rightRemoteTracking_new; - -ovrInputStateGamepad footTrackedRemoteState_old; -ovrInputStateGamepad footTrackedRemoteState_new; - - -ovrDeviceID controllerIDs[2]; - -float remote_movementSideways; -float remote_movementForward; -float remote_movementUp; -float positional_movementSideways; -float positional_movementForward; -float snapTurn; - -float cinemamodeYaw; -float cinemamodePitch; void acquireTrackedRemotesData(const ovrMobile *Ovr, double displayTime); diff --git a/Projects/Android/jni/QzDoom/VrInputCommon.c b/Projects/Android/jni/QzDoom/VrInputCommon.c index ae3fc2d..c5db7e8 100644 --- a/Projects/Android/jni/QzDoom/VrInputCommon.c +++ b/Projects/Android/jni/QzDoom/VrInputCommon.c @@ -15,6 +15,30 @@ Authors : Simon Brown #include "VrInput.h" +ovrInputStateTrackedRemote leftTrackedRemoteState_old; +ovrInputStateTrackedRemote leftTrackedRemoteState_new; +ovrTracking leftRemoteTracking_new; + +ovrInputStateTrackedRemote rightTrackedRemoteState_old; +ovrInputStateTrackedRemote rightTrackedRemoteState_new; +ovrTracking rightRemoteTracking_new; + +ovrInputStateGamepad footTrackedRemoteState_old; +ovrInputStateGamepad footTrackedRemoteState_new; + + +ovrDeviceID controllerIDs[2]; + +float remote_movementSideways; +float remote_movementForward; +float remote_movementUp; +float positional_movementSideways; +float positional_movementForward; +float snapTurn; + +float cinemamodeYaw; +float cinemamodePitch; + void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, int base); void handleTrackedControllerButton(ovrInputStateTrackedRemote * trackedRemoteState, ovrInputStateTrackedRemote * prevTrackedRemoteState, uint32_t button, int key) diff --git a/Projects/Android/jni/QzDoom/VrInputDefault.c b/Projects/Android/jni/QzDoom/VrInputDefault.c index 87bf0d6..417600a 100644 --- a/Projects/Android/jni/QzDoom/VrInputDefault.c +++ b/Projects/Android/jni/QzDoom/VrInputDefault.c @@ -18,6 +18,30 @@ Authors : Simon Brown #include "doomkeys.h" +extern ovrInputStateTrackedRemote leftTrackedRemoteState_old; +extern ovrInputStateTrackedRemote leftTrackedRemoteState_new; +extern ovrTracking leftRemoteTracking_new; + +extern ovrInputStateTrackedRemote rightTrackedRemoteState_old; +extern ovrInputStateTrackedRemote rightTrackedRemoteState_new; +extern ovrTracking rightRemoteTracking_new; + +extern ovrInputStateGamepad footTrackedRemoteState_old; +extern ovrInputStateGamepad footTrackedRemoteState_new; + + +extern ovrDeviceID controllerIDs[2]; + +extern float remote_movementSideways; +extern float remote_movementForward; +extern float remote_movementUp; +extern float positional_movementSideways; +extern float positional_movementForward; +extern float snapTurn; + +extern float cinemamodeYaw; +extern float cinemamodePitch; + int getGameState(); int getMenuState(); void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, int base); diff --git a/Projects/Android/jni/gzdoom-g3.3mgw_mobile b/Projects/Android/jni/gzdoom-g3.3mgw_mobile index c6b023d..7c58811 160000 --- a/Projects/Android/jni/gzdoom-g3.3mgw_mobile +++ b/Projects/Android/jni/gzdoom-g3.3mgw_mobile @@ -1 +1 @@ -Subproject commit c6b023d3e32fac0986c2b65076c761db75696e7c +Subproject commit 7c588113669f0ea72e9782ca93c98eeb76471bfa diff --git a/Projects/Android/local.properties b/Projects/Android/local.properties index 8e88db3..f7e86f8 100644 --- a/Projects/Android/local.properties +++ b/Projects/Android/local.properties @@ -4,6 +4,6 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Thu Dec 12 20:21:11 GMT 2019 -ndk.dir=C\:\\Users\\Simon\\AppData\\Local\\Android\\Sdk\\ndk-bundle +#Wed Feb 02 12:33:02 GMT 2022 +ndk.dir=C\:\\Users\\simon\\AppData\\Local\\Android\\Sdk\\ndk\\20.0.5594570 sdk.dir=C\:\\Users\\Simon\\AppData\\Local\\Android\\Sdk