Fix possible negative dt when restarting simulator;

This commit is contained in:
bjorn 2024-03-17 13:59:13 -07:00
parent 66f6ee9bb9
commit d50f661ce6
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,6 @@ static void onFocus(bool focused) {
static bool simulator_init(HeadsetConfig* config) {
state.config = *config;
state.epoch = os_get_time();
state.clipNear = .01f;
state.clipFar = 0.f;
state.distance = .5f;
@ -85,6 +84,9 @@ static void simulator_start(void) {
state.depthFormat = FORMAT_D24S8; // Guaranteed to be supported if the other one isn't
}
}
state.epoch = os_get_time();
state.time = 0.;
}
static void simulator_stop(void) {