App now has a window handle

This commit is contained in:
Edgaru089 2024-04-22 04:29:48 +08:00
parent 334dbb2740
commit 7c75e10d62
2 changed files with 4 additions and 1 deletions

2
app.h
View File

@ -15,6 +15,8 @@ extern "C" {
typedef struct _App { typedef struct _App {
void *window; // HWND pointer; window handle set by main()
System_Physics *physics; System_Physics *physics;
System_Player *player; System_Player *player;
System_Input *input; System_Input *input;

View File

@ -30,6 +30,7 @@ int main() {
bool debugPressed = false; bool debugPressed = false;
App *app = app_NewApp(); App *app = app_NewApp();
app->window = win;
while (!app->wantQuit) { while (!app->wantQuit) {
if (time_Since(frameCounter).microseconds >= 1000000) { // 1 sec if (time_Since(frameCounter).microseconds >= 1000000) { // 1 sec
/* Duration d = */ time_Reset(&frameCounter); /* Duration d = */ time_Reset(&frameCounter);