summaryrefslogtreecommitdiff
path: root/app.cpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-31 23:38:11 +1100
committerquou <quou@disroot.org>2024-12-31 23:38:11 +1100
commit96b27fe9841e537614962e273ef9f0802365ea6d (patch)
treed1373862f700a83dd476555913b50c969159a836 /app.cpp
parentae7824be86ecc53752a3bee1038c0677ac203cf7 (diff)
ui stuf and things hmm m mmm m シ
Diffstat (limited to 'app.cpp')
-rw-r--r--app.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}