From 7c75e10d629bb221e953753100ceb013f19dd15b Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Mon, 22 Apr 2024 04:29:48 +0800 Subject: [PATCH] App now has a window handle --- app.h | 2 ++ main.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app.h b/app.h index c6b7124..e73f9fc 100644 --- a/app.h +++ b/app.h @@ -15,6 +15,8 @@ extern "C" { typedef struct _App { + void *window; // HWND pointer; window handle set by main() + System_Physics *physics; System_Player *player; System_Input *input; diff --git a/main.cpp b/main.cpp index c2ba271..482edbe 100644 --- a/main.cpp +++ b/main.cpp @@ -29,7 +29,8 @@ int main() { vector_Vector *debugText = vector_Create(1); bool debugPressed = false; - App *app = app_NewApp(); + App *app = app_NewApp(); + app->window = win; while (!app->wantQuit) { if (time_Since(frameCounter).microseconds >= 1000000) { // 1 sec /* Duration d = */ time_Reset(&frameCounter);