From fcc0d688644f332e457f8e22a2b370b07e9976cf Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Sat, 1 May 2021 00:10:46 +0300 Subject: [PATCH] Emscripten: disabled relative mouse mode --- src/video/sdl2_v.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 2d8558534f..08b25c9956 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -209,7 +209,7 @@ bool VideoDriver_SDL_Base::CreateMainSurface(uint w, uint h, bool resize) bool VideoDriver_SDL_Base::ClaimMousePointer() { SDL_ShowCursor(0); -#ifdef __EMSCRIPTEN__ +#ifdef EMSCRIPTEN_RELATIVE_MOUSE SDL_SetRelativeMouseMode(SDL_TRUE); #endif return true; @@ -382,7 +382,7 @@ bool VideoDriver_SDL_Base::PollEvent() switch (ev.type) { case SDL_MOUSEMOTION: -#ifdef __EMSCRIPTEN__ +#ifdef EMSCRIPTEN_RELATIVE_MOUSE if (_cursor_new_in_window) { /* The cursor just moved into the window; this means we don't * know the absolutely position yet to move relative from.