Removed the unnecessary Renderer::getWindowFlags() function.

This commit is contained in:
Leon Styhre 2022-01-14 18:23:51 +01:00
parent 1fc3dfda8c
commit dde456cbc8
2 changed files with 6 additions and 8 deletions

View file

@ -172,10 +172,10 @@ namespace Renderer
// The borderless mode seems to behave well and it's almost completely seamless, especially
// with a hidden taskbar.
if (!userResolution)
windowFlags = SDL_WINDOW_BORDERLESS | getWindowFlags();
windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_OPENGL;
else
// If the resolution has been manually set from the command line, then keep the border.
windowFlags = getWindowFlags();
windowFlags = SDL_WINDOW_OPENGL;
#elif defined(__APPLE__)
// Not sure if this could be a useful setting.
// SDL_SetHint(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES, "0");
@ -188,14 +188,14 @@ namespace Renderer
// configured to run in fullscreen mode or switching to its window will not work, but
// apart from that this mode works fine.
if (!userResolution)
windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALLOW_HIGHDPI | getWindowFlags();
windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL;
else
windowFlags = SDL_WINDOW_ALLOW_HIGHDPI | getWindowFlags();
windowFlags = SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL;
#else
if (!userResolution)
windowFlags = SDL_WINDOW_FULLSCREEN_DESKTOP | getWindowFlags();
windowFlags = SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_OPENGL;
else
windowFlags = getWindowFlags();
windowFlags = SDL_WINDOW_OPENGL;
#endif
if ((sdlWindow =

View file

@ -166,8 +166,6 @@ namespace Renderer
const Renderer::shaderParameters& parameters = shaderParameters(),
unsigned char* textureRGBA = nullptr);
static inline unsigned int getWindowFlags() { return SDL_WINDOW_OPENGL; }
void setupWindow();
bool createContext();
void destroyContext();