engine now uses displaymode to automatically start at desktop size
parent
4d4547551c
commit
44a4b6928c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue