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 {
void *window; // HWND pointer; window handle set by main()
System_Physics *physics;
System_Player *player;
System_Input *input;

View File

@ -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);