From 73008293ba32c00dfd791aaca2524745221a6b9a Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Thu, 26 Jun 2014 05:21:28 +0200 Subject: [PATCH] Window style constraints are handled differently on mobile OSes --- src/SFML/Window/Window.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 6fd7cb6b3..a3a94ed6b 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -109,9 +109,13 @@ void Window::create(VideoMode mode, const String& title, Uint32 style, const Con } } - // Check validity of style - if ((style & Style::Close) || (style & Style::Resize)) - style |= Style::Titlebar; + // Check validity of style according to the underlying platform + #if defined(SFML_SYSTEM_IOS) || defined(SFML_SYSTEM_ANDROID) + style& Style::Fullscreen ? style &= ~Style::Titlebar : style |= Style::Titlebar; + #else + if ((style & Style::Close) || (style & Style::Resize)) + style |= Style::Titlebar; + #endif // Recreate the window implementation m_impl = priv::WindowImpl::create(mode, title, style, settings);