Browse Source

Platform: put platform-specific Sdl2App docs into a dedicated section.

pull/419/merge
Vladimír Vondruš 2 years ago
parent
commit
877c2000db
  1. 7
      doc/changelog.dox
  2. 16
      src/Magnum/Platform/Sdl2Application.h

7
doc/changelog.dox

@ -792,7 +792,8 @@ See also:
- @ref Platform::Sdl2Application now overrides SDL's default behavior that - @ref Platform::Sdl2Application now overrides SDL's default behavior that
prevents computer from entering a power-saving mode while the application prevents computer from entering a power-saving mode while the application
is running, as that's generally undesirable for regular GUI applications. is running, as that's generally undesirable for regular GUI applications.
See @ref Platform-Sdl2Application-usage-power for more information. See @ref Platform-Sdl2Application-platform-specific-power for more
information.
- @ref Platform::GlfwApplication now overrides GLFW's default behavior that - @ref Platform::GlfwApplication now overrides GLFW's default behavior that
changes current working directory to `Resources/` in the app bundle on changes current working directory to `Resources/` in the app bundle on
Apple platforms. Apple platforms.
@ -3170,7 +3171,7 @@ Released 2019-10-24, tagged as
to use a system GL driver or a dedicated GLES driver based on whether to use a system GL driver or a dedicated GLES driver based on whether
@cpp MAGNUM_TARGET_DESKTOP_GLES @ce is defined. This allows for a smoother @cpp MAGNUM_TARGET_DESKTOP_GLES @ce is defined. This allows for a smoother
experience for example when using ANGLE on Windows. See experience for example when using ANGLE on Windows. See
@ref Platform-Sdl2Application-usage-gles for more information. @ref Platform-Sdl2Application-platform-specific-gles for more information.
- Replaced uses of `Pointer_stringify()` in @ref Platform::Sdl2Application - Replaced uses of `Pointer_stringify()` in @ref Platform::Sdl2Application
which was removed in Emscripten 1.38.27 which was removed in Emscripten 1.38.27
- @ref Platform::Sdl2Application and all Emscripten markup was updated to - @ref Platform::Sdl2Application and all Emscripten markup was updated to
@ -4056,7 +4057,7 @@ Released 2018-10-23, tagged as
- @ref Platform::Sdl2Application::Configuration::WindowFlags values that make - @ref Platform::Sdl2Application::Configuration::WindowFlags values that make
no sense on Emscripten are not available there anymore no sense on Emscripten are not available there anymore
- When using SDL 2.0.8 and newer, @ref Platform::Sdl2Application no longer - When using SDL 2.0.8 and newer, @ref Platform::Sdl2Application no longer
attempts to disable compositing on Linux. See @ref Platform-Sdl2Application-usage-linux attempts to disable compositing on Linux. See @ref Platform-Sdl2Application-platform-specific-linux
for more information. See also [mosra/magnum#184](https://github.com/mosra/magnum/issues/184). for more information. See also [mosra/magnum#184](https://github.com/mosra/magnum/issues/184).
- New @cpp "swiftshader-no-empty-egl-context-flags" @ce and - New @cpp "swiftshader-no-empty-egl-context-flags" @ce and
@cpp "swiftshader-egl-context-needs-pbuffer" @ce workarounds to make @cpp "swiftshader-egl-context-needs-pbuffer" @ce workarounds to make

16
src/Magnum/Platform/Sdl2Application.h

@ -285,7 +285,9 @@ If no other application header is included, this class is also aliased to
@cpp Platform::Application @ce and the macro is aliased to @cpp MAGNUM_APPLICATION_MAIN() @ce @cpp Platform::Application @ce and the macro is aliased to @cpp MAGNUM_APPLICATION_MAIN() @ce
to simplify porting. to simplify porting.
@subsection Platform-Sdl2Application-usage-power Power management @section Platform-Sdl2Application-platform-specific Platform-specific behavior
@subsection Platform-Sdl2Application-platform-specific-power Power management
SDL by default prevents the computer from powering off the or screen going to SDL by default prevents the computer from powering off the or screen going to
sleep. While possibly useful for game-like use cases, it's generally sleep. While possibly useful for game-like use cases, it's generally
@ -298,7 +300,7 @@ environment variable or through @cpp SDL_SetHint() @ce from your application.
SDL_VIDEO_ALLOW_SCREENSAVER=0 ./your-app SDL_VIDEO_ALLOW_SCREENSAVER=0 ./your-app
@endcode @endcode
@subsection Platform-Sdl2Application-usage-posix POSIX specifics @subsection Platform-Sdl2Application-platform-specific-posix POSIX specifics
On POSIX systems, SDL by default intercepts the `SIGTERM` signal and generates On POSIX systems, SDL by default intercepts the `SIGTERM` signal and generates
an exit event for it, instead of doing the usual application exit. This would an exit event for it, instead of doing the usual application exit. This would
@ -319,7 +321,7 @@ SDL_NO_SIGNAL_HANDLERS=1 ./your-app
See also the [SDL Wiki](https://wiki.libsdl.org/SDL_EventType#SDL_QUIT) for See also the [SDL Wiki](https://wiki.libsdl.org/SDL_EventType#SDL_QUIT) for
details. details.
@subsection Platform-Sdl2Application-usage-linux Linux specifics @subsection Platform-Sdl2Application-platform-specific-linux Linux specifics
SDL by default attempts to disable compositing, which may cause ugly flickering SDL by default attempts to disable compositing, which may cause ugly flickering
for non-fullscreen apps (KWin, among others, is known to respect this setting). for non-fullscreen apps (KWin, among others, is known to respect this setting).
@ -336,7 +338,7 @@ SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR=1 ./your-app
If you're running an older version of SDL, you can disallow apps from bypassing If you're running an older version of SDL, you can disallow apps from bypassing
the compositor in system-wide KWin settings. the compositor in system-wide KWin settings.
@subsection Platform-Sdl2Application-usage-ios iOS specifics @subsection Platform-Sdl2Application-platform-specific-ios iOS specifics
Leaving a default (zero) window size in @ref Configuration will cause the app Leaving a default (zero) window size in @ref Configuration will cause the app
to autodetect it based on the actual device screen size. This also depends on to autodetect it based on the actual device screen size. This also depends on
@ -351,7 +353,7 @@ a particular value for details:
- @ref Configuration::WindowFlag::Resizable makes the application respond to - @ref Configuration::WindowFlag::Resizable makes the application respond to
device orientation changes device orientation changes
@subsection Platform-Sdl2Application-usage-emscripten Emscripten specifics @subsection Platform-Sdl2Application-platform-specific-emscripten Emscripten specifics
Leaving a default (zero) window size in @ref Configuration will cause the app Leaving a default (zero) window size in @ref Configuration will cause the app
to use a window size that corresponds to *CSS pixel size* of the to use a window size that corresponds to *CSS pixel size* of the
@ -367,7 +369,7 @@ the flag is not enabled, no canvas resizing is performed.
the preferred application implementation for the web. It offers a broader the preferred application implementation for the web. It offers a broader
range of features, more efficient idle behavior and smaller code size. range of features, more efficient idle behavior and smaller code size.
@subsection Platform-Sdl2Application-usage-gles OpenGL ES specifics @subsection Platform-Sdl2Application-platform-specific-gles OpenGL ES specifics
For OpenGL ES, SDL2 defaults to a "desktop GLES" context of the system driver. For OpenGL ES, SDL2 defaults to a "desktop GLES" context of the system driver.
Because Magnum has the opposite default behavior, if @ref MAGNUM_TARGET_GLES is Because Magnum has the opposite default behavior, if @ref MAGNUM_TARGET_GLES is
@ -1209,7 +1211,7 @@ class Sdl2Application {
* which tells the application that it's safe to exit. * which tells the application that it's safe to exit.
* *
* SDL has special behavior on POSIX systems regarding `SIGINT` and * SDL has special behavior on POSIX systems regarding `SIGINT` and
* `SIGTERM` handling, see @ref Platform-Sdl2Application-usage-posix * `SIGTERM` handling, see @ref Platform-Sdl2Application-platform-specific-posix
* for more information. * for more information.
*/ */
virtual void exitEvent(ExitEvent& event); virtual void exitEvent(ExitEvent& event);

Loading…
Cancel
Save