It appears that the SDL_WarpMouseInWindow() function doesn't actually warp the mouse to a new location while running in Emscripten. I've tested with Firefox 95.0.1 in Windows 10, Firefox 95.0 in Lubuntu, and Edge 96.0.1054.57 on Windows 10, with the same result. But it does work as a native program. Here's the version of emscripten I've been using:
...This program draws a red line from the upper left corner to the current mouse position. Use the arrow keys, and note the mouse position doesn't move. This may be a know limitation due to the browser, but I couldn't seem to find it documented anywhere. If there is a better place to report this, please let me know.
It appears that the SDL_WarpMouseInWindow() function doesn't actually warp the mouse to a new location while running in Emscripten. I've tested with Firefox 95.0.1 in Windows 10, Firefox 95.0 in Lubuntu, and Edge 96.0.1054.57 on Windows 10, with the same result. But it does work as a native program. Here's the version of emscripten I've been using:
...and here is a test program to demonstrate the issue:
...This program draws a red line from the upper left corner to the current mouse position. Use the arrow keys, and note the mouse position doesn't move. This may be a know limitation due to the browser, but I couldn't seem to find it documented anywhere. If there is a better place to report this, please let me know.
Thanks!