Browse Source

Platform: Sdl2Application::windowSize() is not available in Emscripten.

pull/158/head
Vladimír Vondruš 10 years ago
parent
commit
c1e45f5e14
  1. 2
      src/Magnum/Platform/Sdl2Application.cpp
  2. 3
      src/Magnum/Platform/Sdl2Application.h

2
src/Magnum/Platform/Sdl2Application.cpp

@ -273,11 +273,13 @@ bool Sdl2Application::tryCreateContext(const Configuration& configuration) {
return true;
}
#ifndef CORRADE_TARGET_EMSCRIPTEN
Vector2i Sdl2Application::windowSize() {
Vector2i size;
SDL_GetWindowSize(_window, &size.x(), &size.y());
return size;
}
#endif
void Sdl2Application::swapBuffers() {
#ifndef CORRADE_TARGET_EMSCRIPTEN

3
src/Magnum/Platform/Sdl2Application.h

@ -421,14 +421,17 @@ class Sdl2Application {
/** @{ @name Screen handling */
#ifndef CORRADE_TARGET_EMSCRIPTEN
/**
* @brief Window size
*
* Window size to which all input event coordinates can be related.
* Note that especially on HiDPI systems the reported window size might
* not be the same as framebuffer size.
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
Vector2i windowSize();
#endif
/**
* @brief Swap buffers

Loading…
Cancel
Save