Browse Source

Platform: fix compilation on Emscripten.

pull/388/head
Vladimír Vondruš 7 years ago
parent
commit
fdcfa419de
  1. 8
      src/Magnum/Platform/Sdl2Application.h

8
src/Magnum/Platform/Sdl2Application.h

@ -868,10 +868,16 @@ class Sdl2Application {
Cursor cursor(); Cursor cursor();
#endif #endif
/** @brief Warp mouse cursor to given coordinates */ #ifndef CORRADE_TARGET_EMSCRIPTEN
/**
* @brief Warp mouse cursor to given coordinates
*
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/
void warpCursor(const Vector2i& position) { void warpCursor(const Vector2i& position) {
SDL_WarpMouseInWindow(_window, position.x(), position.y()); SDL_WarpMouseInWindow(_window, position.x(), position.y());
} }
#endif
/** @brief Whether mouse is locked */ /** @brief Whether mouse is locked */
bool isMouseLocked() const { return SDL_GetRelativeMouseMode(); } bool isMouseLocked() const { return SDL_GetRelativeMouseMode(); }

Loading…
Cancel
Save