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:]]\+$//' {} \+
```
Based on
725fd84b5b/.clang-format
with the following changes:
1. Uncomments `BasedOnStyle: WebKit` to be explicit.
2. Adds:
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
This makes it much simpler to define a buildroot package for xash-extras
buildroot places various buildroot-internal dot files in the package build directory
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.