Modified the build options and source files to enable `omxplayer` for video previews only when the `OMX` option is used.
Updated the build instructions on RPI accordingly and added some notes about the deprecation of the BRCM GPU drivers in RasPI OS 'Bullseye'.
Previously, the `RPI` build option would be used to add both RPI specific audio settings/VRAM limits AND add `omxplayer` support. However, `omxplayer` does not work with the RPI KMS video driver (`vc4-kms-v3d`) or with a 64bit RPI system, due to the lack of OpenMAX (OMX) API support.
The new RasPi OS ('bullseye') has made the KMS driver the default [1] and doesn't offer `omxplayer` anymore (considered deprecated [2]).
Splitting the OMX support from the RPI option allows to set some default values for RPI systems without automatically adding the `omxplayer` bits.
[1] https://www.raspberrypi.com/news/raspberry-pi-os-debian-bullseye/
[2] https://github.com/popcornmix/omxplayer/commit/1f1d0ccd65
Changed the CMP0072[1] `cmake` policy to use `libGL` for OPENGL_LIBRARIES,
instead of `libOpenGL`, provided by `libglvnd` (default from `cmake` 3.11).
This should fix situations where there the OpenGL implementation doesn't have
`glvnd` support and `emulationstation` gets linked to the `glvnd` library.`libSDL2`
dl-loads a different `libGL` and this results in a non-working GL context.
[1] https://cmake.org/cmake/help/git-stage/policy/CMP0072.html
Added support for the GLESv2 renderer to the CMake build.
* Refactored the OpenGLES detection for both versions.
Platform detection is done only in the main project file, settings hints for the GLES headers/libraries detection in the corresponding 'Find' cmake modules.
* Simplified the additions of directories for includes/libraries, based on the same hints added during detection.
Notes:
* GLESv2 is the default for GLES-enabled systems.
* For the Raspberry Pi systems, both the legacy (BRCM) and the new (MESA) GLES libraries can be present.
The selection can be done via the `USE_MESA_GLES` CMake option (default: Off)
By default, the legacy (BRCM) libraries/headers are used, without any special configuration.
For the Pi4, the GL renderer/system must be explicitely selected
** select the OpenGL 2 renderer with `-DGL=On`
** select the GLESv2 renderer with `-DUSE_MESA_GLES=On`
* the GLESv1 renderer can still be forcibly enabled using the `FORCE_GLESv1` build option, for platforms where GLESv1 is the only option.
Minor - set the start-up project in MS Visual Studio to 'emulationstation'.
On the first run it downloads a few resource files needed to intepret the otput of
game search api calls these resources go into ~/.emulatiostation/scrapers
The resource files include the list of developers and the list of publishers.
To update the lists simply delete the files and relaunch emulationstation.
Searching a game by id (GamesDB id) is done as before by manually edit the search
query and query for "id:<gameId>".
* For BCMHOST build, use brcmEGL / brcmGLESv2 libraries, and don't look at
Mesa includes (so libraspberrypi-dev and libgles*-mesa-dev can coexist).
* If overridden via -DGLES=On, don't present vendor includes to build to
make absolutely sure that the Mesa includes are used.
Fixes stretch vendor library building & generic Mesa GLES compatibility.