summaryrefslogtreecommitdiff
path: root/src/gfx_type.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-06 20:18:19 +0100
committerPatric Stout <github@truebrain.nl>2020-12-15 15:46:39 +0100
commitd5b9f7ac37c7d27d1ffe50e55aa73361da64189b (patch)
tree6c7612829daacd062b2d343e62ffbf5c034b60a2 /src/gfx_type.h
parentd15dc9f40f5a20bff452547a2dcb15231f9f969d (diff)
downloadopenttd-d5b9f7ac37c7d27d1ffe50e55aa73361da64189b.tar.xz
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).
Diffstat (limited to 'src/gfx_type.h')
-rw-r--r--src/gfx_type.h1
1 files changed, 1 insertions, 0 deletions
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: