Browse Source

Platform: hide meaningless Sdl2Application window flags on Emscripten.

pull/272/head
Vladimír Vondruš 8 years ago
parent
commit
80ba53dc3c
  1. 2
      doc/changelog.dox
  2. 56
      src/Magnum/Platform/Sdl2Application.h

2
doc/changelog.dox

@ -189,6 +189,8 @@ See also:
- @ref Platform::BasicScreen::viewportEvent() "Platform::Screen::viewportEvent()" - @ref Platform::BasicScreen::viewportEvent() "Platform::Screen::viewportEvent()"
is no longer pure virtual to be consistent with all `*Application` is no longer pure virtual to be consistent with all `*Application`
implementations implementations
- @ref Platform::Sdl2Application::Configuration::WindowFlags values that make
no sense on Emscripten are not available there anymore
@subsubsection changelog-latest-changes-shaders Shaders library @subsubsection changelog-latest-changes-shaders Shaders library

56
src/Magnum/Platform/Sdl2Application.h

@ -1164,10 +1164,21 @@ class Sdl2Application::Configuration {
*/ */
Resizable = SDL_WINDOW_RESIZABLE, Resizable = SDL_WINDOW_RESIZABLE,
Fullscreen = SDL_WINDOW_FULLSCREEN, /**< Fullscreen window */ #ifndef CORRADE_TARGET_EMSCRIPTEN
/**
* Fullscreen window
*
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Fullscreen = SDL_WINDOW_FULLSCREEN,
/** No window decoration. On iOS this hides the menu bar. */ /**
* No window decoration. On iOS this hides the menu bar.
*
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Borderless = SDL_WINDOW_BORDERLESS, Borderless = SDL_WINDOW_BORDERLESS,
#endif
#ifdef MAGNUM_BUILD_DEPRECATED #ifdef MAGNUM_BUILD_DEPRECATED
/** /**
@ -1180,10 +1191,35 @@ class Sdl2Application::Configuration {
AllowHighDpi CORRADE_DEPRECATED_ENUM("has no effect, passed implicitly on platforms that need it") = 0, AllowHighDpi CORRADE_DEPRECATED_ENUM("has no effect, passed implicitly on platforms that need it") = 0,
#endif #endif
Hidden = SDL_WINDOW_HIDDEN, /**< Hidden window */ #ifndef CORRADE_TARGET_EMSCRIPTEN
Maximized = SDL_WINDOW_MAXIMIZED, /**< Maximized window */ /**
Minimized = SDL_WINDOW_MINIMIZED, /**< Minimized window */ * Hidden window
MouseLocked = SDL_WINDOW_INPUT_GRABBED, /**< Window with mouse locked */ *
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Hidden = SDL_WINDOW_HIDDEN,
/**
* Maximized window
*
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Maximized = SDL_WINDOW_MAXIMIZED,
/**
* Minimized window
*
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Minimized = SDL_WINDOW_MINIMIZED,
/**
* Window with mouse locked
*
* @note Not available on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
MouseLocked = SDL_WINDOW_INPUT_GRABBED,
#endif
/** /**
* Do not create any GPU context. Use together with * Do not create any GPU context. Use together with
@ -1202,8 +1238,12 @@ class Sdl2Application::Configuration {
*/ */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
typedef Containers::EnumSet<WindowFlag, SDL_WINDOW_RESIZABLE| typedef Containers::EnumSet<WindowFlag, SDL_WINDOW_RESIZABLE|
SDL_WINDOW_FULLSCREEN|SDL_WINDOW_HIDDEN|SDL_WINDOW_MAXIMIZED| #ifndef CORRADE_TARGET_EMSCRIPTEN
SDL_WINDOW_MINIMIZED|SDL_WINDOW_INPUT_GRABBED> WindowFlags; SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS|SDL_WINDOW_HIDDEN|
SDL_WINDOW_MAXIMIZED|SDL_WINDOW_MINIMIZED|SDL_WINDOW_INPUT_GRABBED|
#endif
Uint32(WindowFlag::Contextless)
> WindowFlags;
#else #else
typedef Containers::EnumSet<WindowFlag> WindowFlags; typedef Containers::EnumSet<WindowFlag> WindowFlags;
#endif #endif

Loading…
Cancel
Save