|
|
@ -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 |
|
|
|
}; |
|
|
|
}; |