They were negative by default but they should've been positive:
> a value ranging from -32768 to 32767. Triggers, however, range from 0 to 32767 (they never return a negative value).
https://wiki.libsdl.org/SDL_GameControllerGetAxis
This fixes LTRIGGER and RTRIGGER (L2/Zl and R2/Zr on most gamepads)
Previously R_CollectRendererNames left gaps in the `ref` subarrays.
This caused `R_Init` to fail in some cases because it iterates between `0` and `ref.numRenderers`.
The `.editorconfig` file in this repo is configured to trim all trailing
whitespace regardless of whether the line is modified.
Trims all trailing whitespace in the repository to make the codebase easier
to work with in editors that respect `.editorconfig`.
`git blame` becomes less useful on these lines but it already isn't very useful.
Commands:
```
find . -type f -name '*.h' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.c' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
```
1. `libref_gles2_gl4es.so` -> `libref_gl4es.so` because this is what's
passed to `R_LoadRenderer`.
2. Add `gl4es` to `DEFAULT_RENDERERS` so that `R_CollectRendererNames`
finds it.
1. Do not disable SDL_JOYSTICK events. Disabling these events causes
game controller events to be disabled as well. Instead, filter these events out.
2. Fix button mapping (it was off by one).
This fixes fades that occur at the beginning of a map being a tad screwy as a result of the ref state not being updated with fresh values, which only happens when a frame is being rendered (loading happens to prevent that).
This fixes a minor bug where sounds played via pfnPlaySoundByNameAtLocation (mainly from viewmodel animations e.g. MP5) would be left where it was emitted in the world, rather than following the local player as it does in Goldsrc.