Skip to content

Commit

Permalink
OpenXR - Version info refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lvonasek committed Jul 26, 2022
1 parent 19ebbb6 commit b2509ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions VR/VRBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ void VR_Init( ovrJava java ) {
// Create the OpenXR instance.
XrApplicationInfo appInfo;
memset(&appInfo, 0, sizeof(appInfo));
strcpy(appInfo.applicationName, "PPSSPP");
appInfo.applicationVersion = 0;
strcpy(appInfo.engineName, "PPSSPP");
appInfo.engineVersion = 0;
strcpy(appInfo.applicationName, java.AppName);
strcpy(appInfo.engineName, java.AppName);
appInfo.applicationVersion = java.AppVersion;
appInfo.engineVersion = java.AppVersion;
appInfo.apiVersion = XR_CURRENT_API_VERSION;

XrInstanceCreateInfo instanceCreateInfo;
Expand Down
2 changes: 2 additions & 0 deletions VR/VRFramebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ typedef struct {
JavaVM* Vm;
jobject ActivityObject;
JNIEnv* Env;
char AppName[64];
int AppVersion;
} ovrJava;

typedef struct {
Expand Down
3 changes: 3 additions & 0 deletions android/jni/app-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,12 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_init
}

#ifdef OPENXR
Version gitVer(PPSSPP_GIT_VERSION);
ovrJava java;
java.Vm = gJvm;
java.ActivityObject = nativeActivity;
java.AppVersion = gitVer.ToInteger();
strcpy(java.AppName, "PPSSPP");
VR_Init(java);
#endif
}
Expand Down

0 comments on commit b2509ad

Please sign in to comment.