Added the SDL12-Compat backend, using a shim library which implements the `sdl1.2` API over SDL2.
The new `sdl12-compat` backend should be used for SDL1 applications when:
* the platform doesn't have `dispmanx` anymore (e.g. `rpi` platforms with RaspiOS Bullseye and later)
* `sdl2` has a working accelerated video & rendering drivers
* not running under `x11` (i.e. KMS)
Note: for SDL1+Videocore specific applications, which use directly the dispmanx/legacy GL stack (e.g. `pcsx-rearmed`, `advmame-1.4`, etc.), the backend will not help.
There was a mix of compareVersions "$__os_debian_ver" OP $arg and [[ "$__os_debian_ver OP $arg ]] around the code.
As $__os_debian_ver is always an integer, use the bash built in operators for performance.
The compareVersions call is significantly slower as it uses an external command (dpkg).
Added sdl1 patch to allow overriding of graphics_get_display_size as it returns 0 on fkms for width and height,
which skips the scaling code and ability to adjust aspect ratio.
New ENV vars are SDL_DISPMANX_WIDTH and SDL_DISPMANX_HEIGHT which we now set manually in runcommand on fkms
when a dispmanx backend is used with sdl1.
This should resolve aspect ratio issues rpi4 users were having with some sdl1 emulators that worked with the dispmanx
backend, but always stretched to fill the entire screen.
This also enables the use of SDL_DISPMANX_RATIO to tweak the ratio when scaling - from 0.2 to 6 - currently
unused in any RetroPie modules by default, but used to be used for tweaking the vice scaling, to more accurately
produce a correct aspect ratio for the C64. But can be used by users manually via emulators.cfg if required.
bumped sdl1 version to force an update - including for Stretch, although this is primarily a buster/rpi4 issue
this allows switching dependencies between binary/source installs and removal if needed - useful in some cases,
as it's possible if our server was offline for a source install to be used, which with the new packaging will be
rememebered - so this allows switching back to binary.
added golang / mesa-drm omxiv / sdl1 and sdl2 to depends section
* create a rp_getBinaryUrl function to get the binary url of a package
* if a module has a __binary_url and it returns an empty string, treat this as no binary available - this allows removing hardcoded logic for sdl1/sdl2 from getDepends
* if a module doesn't have this function but it has its own install_bin don't test for a binary and assume it's ok
This will affect any other kms platforms (tinker), which I will need to revisit - but as the dispmanx backend works
on the rpi4, that's the first priority.
initially the binary package will fail if dependencies are missing so we re-run apt-get
with --fix-broken - however this will install recommendations also so have added
--no-install-recommends to reduce packages installed - this is added primarily due to newer
sdl2 package having more dependencies than before
* rp_module_menus is no more - instead use rp_module_section with one of
- core (core packages)
- main (main packages - which will be installed by default in the image)
- opt (optional packages)
- exp (experimental packages)
- driver (driver packages)
- config (configuration packages / tools)
* The setup menu organises the data based on the above sections. more could be added in the future if needed. Packages (internally modules), can be added / configured / removed individually, or as entire sections.
* The setup menu will automatically detect if a binary is available to be installed. the nobin flag is no longer needed. modules that install directly from binary via aptInstall or via a prebuilt binary need to use an install_bin_ function instead of install_
* rp_module_section of type "config" will have the "gui_" function called first if it's available, otherwise a standard depends/sources/build/install/configure will be called
* configure is no longer used for "gui" configuration function - use gui_ instead. Had already started to move to this before, but now it is required.
* bump version so the new dispmanx code is used - uses vanfanel's triple buffer dispmanx backend + scaling changes and ability to control aspect ratio. see https://github.com/RetroPie/sdl1/commits/rpi
* use one version number for all Raspbian versions
* fix small typo in comment