From 6e97fd2c9ded444d8350af1d2820e60ed6492331 Mon Sep 17 00:00:00 2001 From: Farbs Date: Thu, 12 Feb 2026 11:52:43 +1100 Subject: [PATCH] Formatting fixes (sorry, didn't see the preview option earlier) --- Working-for-Web-(HTML5).md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Working-for-Web-(HTML5).md b/Working-for-Web-(HTML5).md index f127ae6..39671d6 100644 --- a/Working-for-Web-(HTML5).md +++ b/Working-for-Web-(HTML5).md @@ -339,18 +339,18 @@ Q: Jerky and slow mouse movement with DisableCursor? A: This seems to have two causes: 1. RayLib only reports the most recent mouse event, however a browser might send several of these in a frame. In the RayLib function EmscriptenMouseMoveCallback try replacing the following two lines -```c + ```c CORE.Input.Mouse.previousPosition.x = lockedMousePos.x - mouseEvent->movementX; CORE.Input.Mouse.previousPosition.y = lockedMousePos.y - mouseEvent->movementY; -``` -> with -```c + ``` + with + ```c CORE.Input.Mouse.previousPosition.x -= mouseEvent->movementX; CORE.Input.Mouse.previousPosition.y -= mouseEvent->movementY; -``` + ``` -2. By default some browsers (notably Chrome) send large mouse movement spikes unless you specifically request raw inputs. Since Emscripten doesn't send this flag you can sneak it in by adding the following script to your shell html file -```javascript +2. By default some browsers (notably Chrome) reports large spikes in mouse movement unless you specifically request raw inputs. Since Emscripten doesn't send this flag you can sneak it in by running the following script in your shell html file + ```javascript HTMLElement.prototype._requestPointerLock = HTMLElement.prototype.requestPointerLock; HTMLElement.prototype.requestPointerLock = function(options) { @@ -365,4 +365,5 @@ A: This seems to have two causes: } ``` + **Please, feel free to add here your FAQ/Issues to help others!!!**