From 96b27fe9841e537614962e273ef9f0802365ea6d Mon Sep 17 00:00:00 2001 From: quou Date: Tue, 31 Dec 2024 23:38:11 +1100 Subject: ui stuf and things hmm m mmm m シ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app.cpp') diff --git a/app.cpp b/app.cpp index 95f730b..0f57a71 100644 --- a/app.cpp +++ b/app.cpp @@ -515,6 +515,7 @@ int WinMain( #endif void App::init(const char* name) { + dt = 0.0f; internal = (App_Internal*)arena_alloc( arena, sizeof *internal @@ -536,6 +537,7 @@ void App::destroy() { void App::begin() { int j; + begin_t = get_time(); for (j = 0; j < key_count; j++) key_states[j] &= ~( key_state_just_pressed | key_state_just_released @@ -548,6 +550,8 @@ void App::begin() { } void App::end() { + end_t = get_time(); + dt = (float)((double)(end_t - begin_t) / 1000000000.0); internal->end(this); } -- cgit v1.2.3-54-g00ecf