mirror of
https://github.com/DrBeef/DVR.git
synced 2024-11-22 20:21:03 +00:00
Ensure big screen while demo playing
This commit is contained in:
parent
9470d19e61
commit
cb484b0058
2 changed files with 12 additions and 4 deletions
|
@ -264,13 +264,15 @@ JNIEXPORT jint JNICALL Java_doom_util_Natives_setVideoMode
|
|||
|
||||
extern gamestate_t gamestate;
|
||||
extern boolean menuactive;
|
||||
extern boolean demoplayback;
|
||||
|
||||
JNIEXPORT jint JNICALL Java_doom_util_Natives_gameState
|
||||
(JNIEnv * env, jclass cls)
|
||||
{
|
||||
return (int)gamestate +
|
||||
(int) automapmode +
|
||||
menuactive ? 1 : 0;
|
||||
menuactive ? 1 : 0 +
|
||||
demoplayback ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -294,6 +294,7 @@ public class MainActivity
|
|||
bmp.recycle();
|
||||
}
|
||||
|
||||
long prevState = 0;
|
||||
@Override
|
||||
public void onNewFrame(HeadTransform headTransform) {
|
||||
|
||||
|
@ -323,10 +324,17 @@ public class MainActivity
|
|||
}
|
||||
|
||||
if (mDVRInitialised) {
|
||||
if (Natives.gameState() == 0)
|
||||
long newState = Natives.gameState();
|
||||
if (newState == 0)
|
||||
Natives.DoomStartFrame(pitch, yaw, roll);
|
||||
else
|
||||
Natives.DoomStartFrame(0, 0, 0);
|
||||
|
||||
if (newState != prevState)
|
||||
{
|
||||
prevState = newState;
|
||||
cardboardView.resetHeadTracker();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -481,8 +489,6 @@ public class MainActivity
|
|||
Natives.keyEvent(Natives.EV_KEYDOWN, DoomTools.KEY_ENTER);
|
||||
}
|
||||
|
||||
cardboardView.resetHeadTracker();
|
||||
|
||||
dismissSplashScreen();
|
||||
|
||||
triggerTimeout = System.currentTimeMillis();
|
||||
|
|
Loading…
Reference in a new issue