From 4d7493201a716f17218b8bd4db09d9e54e192cd2 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Thu, 7 May 2020 11:42:38 -0400 Subject: [PATCH] integrate working fullscreen patch from reddit thanks /u/leo60228! --- src/pc/gfx/gfx_sdl2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index a1ffd58..d1ef5e8 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -21,6 +21,8 @@ #include "src/pc/controller/controller_keyboard.h" +#include "src/pc/configfile.h" + static SDL_Window *wnd; static int inverted_scancode_table[512]; @@ -86,6 +88,10 @@ static void gfx_sdl_init(void) { wnd = SDL_CreateWindow("Super Mario 64 PC-Port", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, DESIRED_SCREEN_WIDTH, DESIRED_SCREEN_HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); + + if (configFullscreen) { + SDL_SetWindowFullscreen(wnd, SDL_WINDOW_FULLSCREEN_DESKTOP); + } SDL_GL_CreateContext(wnd); SDL_GL_SetSwapInterval(2); // TODO 0, 1 or 2 or remove this line @@ -180,4 +186,4 @@ struct GfxWindowManagerAPI gfx_sdl = { gfx_sdl_swap_buffers_begin, gfx_sdl_swap_buffers_end, gfx_sdl_get_time -}; \ No newline at end of file +};