video: don't create windowed-mode windows under fullscreen-only drivers (#246)

This commit is contained in:
Samuel P 2020-08-16 20:16:01 +02:00 committed by GitHub
parent 51a8340efd
commit 0600ebaea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -436,7 +436,7 @@ static void video_new_window_internal(uint display, uint w, uint h, uint32_t fla
static void video_new_window(uint display, uint w, uint h, bool fs, bool resizable) {
uint32_t flags = SDL_WINDOW_ALLOW_HIGHDPI;
if(fs) {
if(fs || video_query_capability(VIDEO_CAP_FULLSCREEN) == VIDEO_ALWAYS_ENABLED) {
flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
} else if(resizable && video.backend != VIDEO_BACKEND_EMSCRIPTEN) {
flags |= SDL_WINDOW_RESIZABLE;