diff --git a/game/main.c b/game/main.c index 93990b2..0000668 100644 --- a/game/main.c +++ b/game/main.c @@ -144,6 +144,14 @@ int cmpDrawData(const void *a, const void *b) { } bool init(void *userData) { + // Center window + int monitor = GetCurrentMonitor(); + int monitorWidth = GetMonitorWidth(monitor); + int monitorHeight = GetMonitorHeight(monitor); + int windowWidth = GetScreenWidth(); + int windowHeight = GetScreenHeight(); + SetWindowPosition((int)(monitorWidth / 2) - (int)(windowWidth / 2), (int)(monitorHeight / 2) - (int)(windowHeight / 2)); + BZ_UNUSED(userData); SetExitKey(0);