Formatting fixes (sorry, didn't see the preview option earlier)

Farbs
2026-02-12 11:52:43 +11:00
parent 39cf892872
commit 6e97fd2c9d

@ -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!!!**