Create OpenGL surfaces properly again
This commit is contained in:
parent
a8fd35cd91
commit
71b4952599
1 changed files with 9 additions and 2 deletions
|
@ -161,9 +161,16 @@ static void gfx_sdl_init(const char *game_name, const char* gfx_name, bool start
|
|||
char title[512];
|
||||
int len = sprintf(title, "%s (SDL - %s)", game_name, gfx_name);
|
||||
|
||||
// TODO: decide between opengl/vulkan surface c reation
|
||||
// FIXME: what
|
||||
int extra_flags = 0;
|
||||
if(strcmp(gfx_name, "Vulkan") == 0) {
|
||||
extra_flags = SDL_WINDOW_VULKAN;
|
||||
} else {
|
||||
extra_flags = SDL_WINDOW_OPENGL;
|
||||
}
|
||||
|
||||
wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
window_width, window_height, SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
|
||||
window_width, window_height, extra_flags | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
|
||||
|
||||
if (start_in_fullscreen) {
|
||||
set_fullscreen(true, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue