integrate working fullscreen patch from reddit

thanks /u/leo60228!
This commit is contained in:
Cadey Ratio 2020-05-07 11:42:38 -04:00
parent 504b225b62
commit 4d7493201a
1 changed files with 7 additions and 1 deletions

View File

@ -21,6 +21,8 @@
#include "src/pc/controller/controller_keyboard.h" #include "src/pc/controller/controller_keyboard.h"
#include "src/pc/configfile.h"
static SDL_Window *wnd; static SDL_Window *wnd;
static int inverted_scancode_table[512]; static int inverted_scancode_table[512];
@ -87,6 +89,10 @@ static void gfx_sdl_init(void) {
wnd = SDL_CreateWindow("Super Mario 64 PC-Port", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 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); 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_CreateContext(wnd);
SDL_GL_SetSwapInterval(2); // TODO 0, 1 or 2 or remove this line SDL_GL_SetSwapInterval(2); // TODO 0, 1 or 2 or remove this line