From 5527b9f373ef4267a2b44f816be07ddab48a289d Mon Sep 17 00:00:00 2001 From: DS Date: Mon, 20 Feb 2023 13:22:28 +0100 Subject: [PATCH] SDL: Use SDL_WINDOW_FULLSCREEN_DESKTOP and allow to maximize+fullscreen at once (#156) --- source/Irrlicht/CIrrDeviceSDL.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/Irrlicht/CIrrDeviceSDL.cpp b/source/Irrlicht/CIrrDeviceSDL.cpp index 23f00d25..1af434b8 100644 --- a/source/Irrlicht/CIrrDeviceSDL.cpp +++ b/source/Irrlicht/CIrrDeviceSDL.cpp @@ -234,13 +234,17 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param) createKeyMap(); if (CreationParams.Fullscreen) { +#ifdef _IRR_EMSCRIPTEN_PLATFORM_ SDL_Flags |= SDL_WINDOW_FULLSCREEN; - } else { - if (Resizable) - SDL_Flags |= SDL_WINDOW_RESIZABLE; - if (CreationParams.WindowMaximized) - SDL_Flags |= SDL_WINDOW_MAXIMIZED; +#else + SDL_Flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; +#endif } + if (Resizable) + SDL_Flags |= SDL_WINDOW_RESIZABLE; + if (CreationParams.WindowMaximized) + SDL_Flags |= SDL_WINDOW_MAXIMIZED; + if (CreationParams.DriverType == video::EDT_OPENGL) { SDL_Flags |= SDL_WINDOW_OPENGL;