diff --git a/src/engine.c b/src/engine.c index d3b6e14..e0715b6 100644 --- a/src/engine.c +++ b/src/engine.c @@ -29,7 +29,7 @@ int _engine_shutdown() { static inline void _handle_events() { while(SDL_PollEvent(&g_context.event)) { - input_event(g_context.event); + input_notify_event(g_context.event); switch(g_context.event.type) { case SDL_QUIT: g_context.running = 0; @@ -40,7 +40,9 @@ void _handle_events() { static inline int _engine_run() { - SDL_Window* window = SDL_CreateWindow("Tabletop", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 420, SDL_WINDOW_FULLSCREEN_DESKTOP); + SDL_DisplayMode mode; + SDL_GetDesktopDisplayMode(0, &mode); + SDL_Window* window = SDL_CreateWindow("Tabletop", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, mode.w, mode.h, SDL_WINDOW_FULLSCREEN_DESKTOP); g_context = (context_t){ .window = window,