Browse Source

Platform: use zero window size on iOS and let SDL2 autodetect.

Hopefully this feature won't go away in some future version.
pull/136/head
Vladimír Vondruš 10 years ago
parent
commit
a771b60af6
  1. 7
      src/Magnum/Platform/Sdl2Application.cpp
  2. 5
      src/Magnum/Platform/Sdl2Application.h

7
src/Magnum/Platform/Sdl2Application.cpp

@ -439,7 +439,12 @@ Sdl2Application::Configuration::Configuration():
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_IOS)
_title("Magnum SDL2 Application"),
#endif
_size(800, 600), _windowFlags{}, _sampleCount(0)
#ifndef CORRADE_TARGET_IOS
_size{800, 600},
#else
_size{}, /* SDL2 detects someting for us */
#endif
_windowFlags{}, _sampleCount(0)
#ifndef CORRADE_TARGET_EMSCRIPTEN
, _version(Version::None), _sRGBCapable{false}
#endif

5
src/Magnum/Platform/Sdl2Application.h

@ -653,7 +653,10 @@ class Sdl2Application::Configuration {
* @brief Set window size
* @return Reference to self (for method chaining)
*
* Default is `{800, 600}`.
* Default is `{800, 600}`. On iOS it defaults to a "reasonable" size
* based on whether HiDPI support is enabled using
* @ref WindowFlag::AllowHighDpi, but not necessarily native display
* resolution (you have to set it explicitly).
*/
Configuration& setSize(const Vector2i& size) {
_size = size;

Loading…
Cancel
Save