diff --git a/doc/changelog.dox b/doc/changelog.dox index 4632bd783..13c7e5c19 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -185,6 +185,12 @@ See also: allocation function, which changed signature in 2.0.5 and caused runtime failures when `-s ASSERTIONS` was enabled. A public stable API is now used instead, see [mosra/magnum#483](https://github.com/mosra/magnum/pull/483). +- Because hardcoding canvas size using + @ref Platform::EmscriptenApplication::Configuration::setSize() "Platform::Application::Configuration::setSize()" + on WebGL is usually a wrong thing to do, both + @ref Platform::EmscriptenApplication and @ref Platform::Sdl2Application now + notify about that in the verbose output (enabled with `?magnum-log=verbose`), + previously only autodetected canvas size got printed @subsubsection changelog-latest-changes-shaders Shaders library diff --git a/src/Magnum/Platform/EmscriptenApplication.cpp b/src/Magnum/Platform/EmscriptenApplication.cpp index e6c3e940b..526762f7c 100644 --- a/src/Magnum/Platform/EmscriptenApplication.cpp +++ b/src/Magnum/Platform/EmscriptenApplication.cpp @@ -404,6 +404,9 @@ bool EmscriptenApplication::tryCreate(const Configuration& configuration, const Vector2i canvasSize; if(!configuration.size().isZero()) { canvasSize = configuration.size(); + /* Because hardcoding canvas size for WebGL is usually a wrong thing to + do, notify about that in the verbose output */ + Debug{verbose} << "Platform::EmscriptenApplication::tryCreate(): hardcoded canvas size" << canvasSize; } else { canvasSize = _lastKnownCanvasSize; Debug{verbose} << "Platform::EmscriptenApplication::tryCreate(): autodetected canvas size" << canvasSize; diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp index b186c0d36..d61a0496f 100644 --- a/src/Magnum/Platform/Sdl2Application.cpp +++ b/src/Magnum/Platform/Sdl2Application.cpp @@ -408,6 +408,9 @@ bool Sdl2Application::tryCreate(const Configuration& configuration) { Vector2i windowSize; if(!configuration.size().isZero()) { windowSize = configuration.size(); + /* Because hardcoding canvas size for WebGL is usually a wrong thing to + do, notify about that in the verbose output */ + Debug{_verboseLog ? Debug::output() : nullptr} << "Platform::Sdl2Application::tryCreate(): hardcoded canvas size" << windowSize; } else { windowSize = _lastKnownCanvasSize; Debug{_verboseLog ? Debug::output() : nullptr} << "Platform::Sdl2Application::tryCreate(): autodetected canvas size" << windowSize; @@ -636,6 +639,9 @@ bool Sdl2Application::tryCreate(const Configuration& configuration, const GLConf Vector2i windowSize; if(!configuration.size().isZero()) { windowSize = configuration.size(); + /* Because hardcoding canvas size for WebGL is usually a wrong thing to + do, notify about that in the verbose output */ + Debug{_verboseLog ? Debug::output() : nullptr} << "Platform::Sdl2Application::tryCreate(): hardcoded canvas size" << windowSize; } else { windowSize = _lastKnownCanvasSize; Debug{_verboseLog ? Debug::output() : nullptr} << "Platform::Sdl2Application::tryCreate(): autodetected canvas size" << windowSize;