From 6e47205f25647667c6bf9ecd8a99fac59853b4fc Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 9 Jan 2025 21:36:29 +1100 Subject: update windows app --- app.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app.cpp b/app.cpp index ff8d7ba..6628e0e 100644 --- a/app.cpp +++ b/app.cpp @@ -524,7 +524,22 @@ int WinMain( (void)show_cmd; g_instance = instance; SetProcessDPIAware(); - return entrypoint(); + char* mem = (char*)malloc(app_memory_size); + Arena* arena = (Arena*)mem; + App* a; + mem += sizeof * arena; + init_arena(arena, mem, app_memory_size - sizeof * arena); + a = entrypoint(arena); + a->arena = arena; + a->on_init(); + while (a->running) { + a->begin(); + a->on_update(); + a->end(); + } + a->on_destroy(); + a->destroy(); + return 0; } #endif -- cgit v1.2.3-54-g00ecf