Browse Source

Platform: properly include SDL_main.h for iOS.

Got missed when cleaning up the 50kLOC header mess in
b73b9cb408 (Nov 2018). Sorry!
pull/415/head
Vladimír Vondruš 6 years ago
parent
commit
5a3288154b
  1. 5
      doc/changelog.dox
  2. 1
      doc/snippets/MagnumGL-framebuffer.cpp
  3. 10
      src/Magnum/Platform/Sdl2Application.h

5
doc/changelog.dox

@ -177,6 +177,11 @@ See also:
- Fixed broken @ref Platform::EmscriptenApplication mouse event coordinates
when `-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1` is enabled (see
[mosra/magnum#408](https://github.com/mosra/magnum/issues/408))
- In 2019.01 @ref Magnum/Platform/Sdl2Application.h went through an include
cleanup, removing 50k lines; but unfortunately we forgot to add back
@cpp #include <SDL_main.h> @ce, causing iOS builds to fail to initialize.
The include got added back and initialization failures are reported with
more information now.
@subsection changelog-latest-deprecated Deprecated APIs

1
doc/snippets/MagnumGL-framebuffer.cpp

@ -97,4 +97,5 @@ GL::Buffer b; // implicitly tied to `other`
/* [Context-makeCurrent] */
}
return 0; /* on iOS SDL redefines main to SDL_main and then return is needed */
}

10
src/Magnum/Platform/Sdl2Application.h

@ -61,6 +61,16 @@
#include <SDL_video.h>
#include <SDL_scancode.h>
#ifdef CORRADE_TARGET_IOS
/* Including SDL_main.h unconditionally would mean it'd override Corrade::Main
on Windows (both are parsing wargv and converting them to UTF-8, but ours
does that better and additionally enables ANSI colors and UTF-8 console
output). Right now (SDL 2.0.11) it's only needed for WinRT (which is done
below), Android (which we don't support for SDL) and iOS, so whitelist it
only for iOS. */
#include <SDL_main.h>
#endif
#ifdef CORRADE_TARGET_WINDOWS_RT
#include <SDL_main.h> /* For SDL_WinRTRunApp */
#include <wrl.h> /* For the WinMain entrypoint */

Loading…
Cancel
Save