From cecb7ebfab05c107ddafab71160c0e3c69487ae9 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Tue, 15 Mar 2022 13:57:01 -0400 Subject: [PATCH] use sdl init flags in the correct call --- include/tangerine.h | 2 +- src/tangerine.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/tangerine.h b/include/tangerine.h index 72fd171..7eca3b4 100644 --- a/include/tangerine.h +++ b/include/tangerine.h @@ -193,7 +193,7 @@ struct RenderState #define DEFAULT_WIDTH 1280 #define DEFAULT_HEIGHT 720 -#define DEFAULT_SDL_FLAGS SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE +#define DEFAULT_SDL_FLAGS SDL_INIT_VIDEO #define DEFAULT_MODEL_COUNT 256 #define DEFAULT_TEXTURE_COUNT 64 #define DEFAULT_SHADER_COUNT 64 diff --git a/src/tangerine.cpp b/src/tangerine.cpp index 9f82d5d..d3ca8d8 100644 --- a/src/tangerine.cpp +++ b/src/tangerine.cpp @@ -278,9 +278,9 @@ initGraphics(SDLHandles* handles, const char* title, uvec2 dims) SDL_WINDOWPOS_CENTERED_DISPLAY(0), dims.x, dims.y, - handles->SDL_flags); + SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE); - if (SDL_Init(SDL_INIT_VIDEO) != 0) { + if (SDL_Init(handles->SDL_flags) != 0) { std::cout << "error, sdl init: " << SDL_GetError() << "\n"; return false; }