From 54f98909c8871a57efb40263b215b81f22010b22 Mon Sep 17 00:00:00 2001 From: Antoine Fontaine Date: Sun, 12 Jun 2022 11:48:05 +0200 Subject: [PATCH] Correct relative mouse input handling Closes https://github.com/DaemonEngine/Daemon/issues/600. Hopefully for good this time. --- CMakeLists.txt | 15 --------------- src/engine/sys/sdl_input.cpp | 9 --------- 2 files changed, 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8f419e9d4..13e43b6d2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -615,21 +615,6 @@ endif() # SDL, required for all targets on win32 because of iconv and SDL_SetHint(SDL_TIMER_RESOLUTION, 0) if (BUILD_CLIENT OR WIN32) find_package(SDL2 REQUIRED) - # Non-Linux systems use pre-compiled SDL we provide, - # so no one of them is using unapproved version. - if(LINUX) - find_package(SDL2 QUIET CONFIG) - if(SDL2_VERSION) - if (SDL2_VERSION VERSION_GREATER_EQUAL "2.0.16" - AND SDL2_VERSION VERSION_LESS_EQUAL "2.0.20") - message(WARNING "SDL ${SDL2_VERSION} between version 2.0.16 and 2.0.20 is known to be buggy, see https://github.com/DaemonEngine/Daemon/issues/600") - endif() - else() - # CMake may be able to find SDL2 without supporting CONFIG - # If sdl2-config.cmake or SDL2Config.cmake isn't provided. - message(STATUS "SDL version is unknown, version can't be checked for known bugs") - endif() - endif() include_directories(${SDL2_INCLUDE_DIR}) diff --git a/src/engine/sys/sdl_input.cpp b/src/engine/sys/sdl_input.cpp index 5361cb5504..83b31e1246 100644 --- a/src/engine/sys/sdl_input.cpp +++ b/src/engine/sys/sdl_input.cpp @@ -1082,15 +1082,6 @@ static void IN_ProcessEvents( bool dropInput ) else { Com_QueueEvent( Util::make_unique(e.motion.xrel, e.motion.yrel) ); -#if defined( __linux__ ) || defined( __BSD__ ) - if ( !in_nograb->integer && ( e.motion.xrel || e.motion.yrel ) ) - { - // work around X window managers and edge-based workspace flipping - // - without this, we get LeaveNotify, no mouse button events, EnterNotify; - // we would likely miss some button presses and releases. - IN_CenterMouse(); - } -#endif } } break;