diff --git a/Projects/Android/AndroidManifest.xml b/Projects/Android/AndroidManifest.xml index e34a460..239cfe9 100644 --- a/Projects/Android/AndroidManifest.xml +++ b/Projects/Android/AndroidManifest.xml @@ -1,8 +1,8 @@ + package="com.drbeef.jkquest" + android:versionCode="31" + android:versionName="0.5.0" android:installLocation="auto" > diff --git a/Projects/Android/jni/JKVR/OpenXrInput_MetaQuest.cpp b/Projects/Android/jni/JKVR/OpenXrInput_MetaQuest.cpp index 3608393..bead3b8 100644 --- a/Projects/Android/jni/JKVR/OpenXrInput_MetaQuest.cpp +++ b/Projects/Android/jni/JKVR/OpenXrInput_MetaQuest.cpp @@ -1,10 +1,10 @@ #include "VrInput.h" #include "VrCvars.h" -extern ovrApp gAppState; - #ifdef META_QUEST +extern ovrApp gAppState; + XrSpace CreateActionSpace(XrAction poseAction, XrPath subactionPath) { XrActionSpaceCreateInfo asci = {}; asci.type = XR_TYPE_ACTION_SPACE_CREATE_INFO; @@ -443,17 +443,17 @@ void JKVR_Vibrate( int duration, int chan, float intensity ) { for (int i = 0; i < 2; ++i) { - int channel = (i + 1) & chan; - if (channel) + int channel = 1-i; + if ((i + 1) & chan) { - if (vibration_channel_duration[i] > 0.0f) + if (vibration_channel_duration[channel] > 0.0f) return; - if (vibration_channel_duration[i] == -1.0f && duration != 0.0f) + if (vibration_channel_duration[channel] == -1.0f && duration != 0.0f) return; - vibration_channel_duration[i] = duration; - vibration_channel_intensity[i] = intensity * vr_haptic_intensity->value; + vibration_channel_duration[channel] = duration; + vibration_channel_intensity[channel] = intensity * vr_haptic_intensity->value; } } } diff --git a/Projects/Android/jni/JKVR/OpenXrInput_PicoXR.cpp b/Projects/Android/jni/JKVR/OpenXrInput_PicoXR.cpp index e6ab62a..c37ac52 100644 --- a/Projects/Android/jni/JKVR/OpenXrInput_PicoXR.cpp +++ b/Projects/Android/jni/JKVR/OpenXrInput_PicoXR.cpp @@ -1,9 +1,9 @@ #include "VrInput.h" #include "VrCvars.h" -extern ovrApp gAppState; +#ifdef PICO_XR -//#ifdef PICO_XR +extern ovrApp gAppState; XrResult CheckXrResult(XrResult res, const char* originator) { if (XR_FAILED(res)) { @@ -580,17 +580,17 @@ void JKVR_Vibrate( int duration, int chan, float intensity ) { for (int i = 0; i < 2; ++i) { - int channel = (i + 1) & chan; - if (channel) + int channel = 1-i; + if ((i + 1) & chan) { - if (vibration_channel_duration[i] > 0.0f) + if (vibration_channel_duration[channel] > 0.0f) return; - if (vibration_channel_duration[i] == -1.0f && duration != 0.0f) + if (vibration_channel_duration[channel] == -1.0f && duration != 0.0f) return; - vibration_channel_duration[i] = duration; - vibration_channel_intensity[i] = intensity * vr_haptic_intensity->value; + vibration_channel_duration[channel] = duration; + vibration_channel_intensity[channel] = intensity * vr_haptic_intensity->value; } } } @@ -638,4 +638,4 @@ void JKVR_processHaptics() { } } } -//#endif +#endif //PICO_XR diff --git a/Projects/Android/jni/JKVR/VrCommon.h b/Projects/Android/jni/JKVR/VrCommon.h index f4a6dbf..b57bbeb 100644 --- a/Projects/Android/jni/JKVR/VrCommon.h +++ b/Projects/Android/jni/JKVR/VrCommon.h @@ -153,7 +153,7 @@ OXR_CheckErrors(XrInstance instance, XrResult result, const char* function, bool #if defined(DEBUG) #define OXR(func) OXR_CheckErrors(ovrApp_GetInstance(), func, #func, true); #else -#define OXR(func) OXR_CheckErrors(ovrApp_GetInstance(), func, #func, false); +#define OXR(func) func; #endif typedef struct { @@ -226,13 +226,6 @@ void ovrTrackedController_Clear(ovrTrackedController* controller); ovrMatrix4f ovrMatrix4f_Multiply(const ovrMatrix4f* a, const ovrMatrix4f* b); ovrMatrix4f ovrMatrix4f_CreateRotation(const float radiansX, const float radiansY, const float radiansZ); ovrMatrix4f ovrMatrix4f_CreateFromQuaternion(const XrQuaternionf* q); -ovrMatrix4f ovrMatrix4f_CreateProjectionFov( - const float fovDegreesX, - const float fovDegreesY, - const float offsetX, - const float offsetY, - const float nearZ, - const float farZ); XrVector4f XrVector4f_MultiplyMatrix4f(const ovrMatrix4f* a, const XrVector4f* v);