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).
This commit is contained in:
Patric Stout
2020-12-06 20:18:19 +01:00
committed by Patric Stout
parent d15dc9f40f
commit d5b9f7ac37
3 changed files with 59 additions and 1 deletions

View File

@@ -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: