From d5b9f7ac37c7d27d1ffe50e55aa73361da64189b Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 6 Dec 2020 20:18:19 +0100 Subject: Add: [Emscripten] use "relative mouse mode" with SDL2 This mode doesn't wrap the mouse constantly, but requests SDL to lock the mouse pointer. This is needed, as with Emscripten you are not allowed to change the mouse poisition (only to lock it into place). --- src/gfx_type.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gfx_type.h') diff --git a/src/gfx_type.h b/src/gfx_type.h index 452bc2c7e..ab802c45e 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -143,6 +143,7 @@ struct CursorVars { /* Drag data */ bool vehchain; ///< vehicle chain is dragged + void UpdateCursorPositionRelative(int delta_x, int delta_y); bool UpdateCursorPosition(int x, int y, bool queued_warp); private: -- cgit v1.2.3-54-g00ecf