Skip to content

Commit 5c6a51e

Browse files
committed
FOrce refresh rate setting on each frame
1 parent df5f332 commit 5c6a51e

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c

+5-25
Original file line numberDiff line numberDiff line change
@@ -1465,11 +1465,6 @@ void * AppThreadFunction(void * parm ) {
14651465
return NULL;
14661466
}
14671467

1468-
//Set the screen refresh
1469-
if (DISPLAY_REFRESH != -1) {
1470-
vrapi_SetDisplayRefreshRate(gAppState.Ovr, DISPLAY_REFRESH);
1471-
}
1472-
14731468
// Create the scene if not yet created.
14741469
ovrScene_Create( m_width, m_height, &gAppState.Scene, &java );
14751470

@@ -1486,26 +1481,6 @@ void * AppThreadFunction(void * parm ) {
14861481
//Should now be all set up and ready - start the Doom main loop
14871482
VR_DoomMain(argc, argv);
14881483
}
1489-
//Doesn't work
1490-
/*
1491-
else {
1492-
if (!hasLauncher) {
1493-
vrapi_ShowFatalError(&gAppState.Java, "Missing Launcher",
1494-
"Please install and run QuestZDoom Launcher to start correctly",
1495-
"QuestZDoom", 666);
1496-
} else {
1497-
vrapi_ShowFatalError(&gAppState.Java, "No IWADs Found",
1498-
"Please install a valid IWAD using QuestZDoom Launcher",
1499-
"QuestZDoom", 666);
1500-
}
1501-
1502-
while (!destroyed) {
1503-
QzDoom_processMessageQueue();
1504-
QzDoom_getTrackedRemotesOrientation(0);
1505-
incrementFrameIndex();
1506-
showLoadingIcon();
1507-
}
1508-
}*/
15091484

15101485
//We are done, shutdown cleanly
15111486
shutdownVR();
@@ -1521,6 +1496,11 @@ void QzDoom_FrameSetup()
15211496
{
15221497
//Use floor based tracking space
15231498
vrapi_SetTrackingSpace(gAppState.Ovr, VRAPI_TRACKING_SPACE_LOCAL_FLOOR);
1499+
1500+
//Set the screen refresh - repeat this every frame so VrApi doesn't try changing it on us
1501+
if (DISPLAY_REFRESH != -1) {
1502+
vrapi_SetDisplayRefreshRate(gAppState.Ovr, DISPLAY_REFRESH);
1503+
}
15241504
}
15251505

15261506
void QzDoom_processHaptics() {//Handle haptics

0 commit comments

Comments
 (0)