diff options
author | quou <quou@disroot.org> | 2025-01-09 21:36:29 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-09 21:36:29 +1100 |
commit | 6e47205f25647667c6bf9ecd8a99fac59853b4fc (patch) | |
tree | 93338e2586912cd7235f226b79497f5d0480ed87 | |
parent | bf29ba639dbec647fc347a401cff05ced7e2b22f (diff) |
update windows app
-rw-r--r-- | app.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 |