Commit graph

172 commits

Author SHA1 Message Date
cmitu
325df5ffc5 emulationstation: SDL gamecontroller mapping suppport
Added an input configuration script which will produce a SDL(2) gamecontroller mapping ([1]) based on the user's choices in the EmulationStation input configuration. The result of the mapping is saved in `/opt/retropie/configs/all/sdl2_gamecontrollerdb.txt`, which can be referenced by `runcommand` to load the mappings through SDL hints ([2] or [3]).

Since we're not trying to overwrite the existing built-in mappings, I've added a query method which needs `python3-sdl2` as dependency.

The mapping produced should follow the user's choices as far as inputs are concerned. The only 'outlier' is the 'hotkey enable' button, which is mapped to the 'Guide' SDL gamepad button IF its value is different than the _Select_ input. This way the extra button present on various gamepads (Xbox/PS) or a dedicated button chosen by the user can be mapped separately.

Ref:

[1] https://wiki.libsdl.org/SDL2/SDL_GameControllerAddMapping
[2] https://wiki.libsdl.org/SDL2/SDL_HINT_GAMECONTROLLERCONFIG
[3] https://wiki.libsdl.org/SDL2/SDL_HINT_GAMECONTROLLERCONFIG_FILE
2025-02-19 16:21:19 +00:00
G Derber
f7761fd635
Add ability to differentiate group ownership from user ownership. 2024-08-06 09:38:25 -04:00
theofficialgman
a9bdf98195 emulationstation: fix OpenGL version check 2024-05-08 15:28:33 -04:00
cmitu
d74eb0f15e emulationstation: fix fullscreen launching params on Wayland/Gnome
When running under Gnome/Wayland on Ubuntu 22.04 default configuration, the '--fullscreen-borderless' is not actually fullscreen.
The top horizontal panel (?) is still visible and the EmulationStation window is actually pushed down.

Running with just '--fullscreen' is enough, but this is the default, thus there's no need to add any additional parameters when Gnome/Wayland is the current session.
Tested on an updated Ubuntu 22.04, with the default Gnome session.
2024-01-07 10:34:23 +00:00
Aaron Pfeifer
6aa579a959 emulationstation.sh: Fix all commands for the onfinish input action in es_input.cfg being overwritten during configuration 2023-06-04 09:50:30 -04:00
cmitu
02bed52ff0 emulationstation: use OpenGL2 for RPI+Mesa platform
The last runtime detection changes for the build instructions enable the GL21 renderer only on non-RPI platforms.
The V3D Mesa driver supports OpenGL 2.1, so enable the GL21 renderer when it's used on a Raspberry Pi.

Without this change, the build will use the GL1.4 renderer.
2023-04-23 07:29:02 +01:00
Stefan
07a2fa1c46
emulationstation.sh: remove deprecated X is running test
The "X is running" test in emulationstation startup script is deprecated. X was replaced by Xorg a long time ago (pre Debian stretch and Ubuntu bionic). The test could be modified to support Xorg, but emulationstation runs quiet well under x11. Just remove it.
2023-03-22 18:28:51 +01:00
Stefan
92eb182839
emulationstation.sh: workaround Ubuntu 22.04 focus problem
Emulationstation has focus problems under Ubuntu 22.04's "GNOME on Wayland" session. Don't use SDL2's wayland driver and run emulationstation with --fullscreen-borderless if desktop session is "GNOME on Wayland".
2023-03-06 12:43:14 +01:00
Stefan
88dafca9e1 emulationstation: modify wayland detection
I have done some tests running weston/wayland from CLI with a rpi4/raspbian-lite. After startup of weston $XDG_SESSION_TYPE is still "tty". If I start a weston/wayland session with graphical login (display manager sddm or gdm3) $XDG_SESSION_TYPE is "wayland". $WAYLAND_DISPLAY can be found in both constellations and seems to be more reliable. On a rpi4 $WAYLAND_DISPLAY=wayland-0. Just replace $XDG_SESSION_TYPE with $WAYLAND_DISPLAY.
2023-02-21 21:17:35 +01:00
Jools Wills
b956140cf5
Merge pull request #3624 from gizmo98/emulationstation-gles
emulationstation: allow gles for all platforms
2023-01-25 21:08:45 +00:00
Jools Wills
b99646897b
Merge pull request #3623 from gizmo98/sdl2-wayland
emulationstation: use SDL2 wayland videodriver if applicable
2023-01-25 19:18:55 +00:00
Stefan
6834e407be
emulationstation: allow gles for all platforms
gles can be used under x11, wayland, kms, dispmanx and fb. Respect gles platform flag and build emulationstation with gles renderer if requested.
2023-01-24 20:10:32 +01:00
Stefan
4e38965afe
emulationstation: use SDL2 wayland videodriver if applicable
If a Gnome or Weston Wayland session is started under Ubuntu 22.04, SDL2 falls back to x11 videodriver. There is ARM hardware which runs much faster and without graphical glitches if the SDL2 wayland video driver is used. To prevent SDL2 from using x11 video driver, export "SDL_VIDEODRIVER=wayland" if Wayland session is detected.
2023-01-23 20:48:44 +01:00
Stefan
91dd24622b emulationstation: fix OpenGL version 2.1 check
Emulationstation does not run with -DUSE_GL21=On if gpu supports GL <= 2.0. Fix OpenGL version check.
2023-01-23 20:02:29 +01:00
Jools Wills
61c46aa005 Use bash operators instead of compareVersions for __os_debian_ver
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).
2022-12-03 16:02:39 +00:00
cmitu
572fb1b766 emulationstation: add mesa-utils dependency on X11
Added `mesa-utils` for `glxinfo`, used during build to detect the OpenGL version.
2022-09-18 07:16:31 +01:00
Stefan
cf0b7e8bcb
emulationstation: fix OpenGL 2.1 for x11
Add new build option for OpenGL 2.1 renderer on x11 platforms.
https://github.com/RetroPie/EmulationStation/pull/795/files
2022-06-12 13:03:38 +02:00
cmitu
7fb44911ca emulationstation: build omxplayer only on dispmanx platforms
Starting with RaspiOS 'bullseye', the `omxplayer` RPI video player is no longer supported.
Use the new EmulationStation build option (`OMX`) to enable the `omxplayer` bits only for `dispmanx` platforms. The new options is added in https://github.com/RetroPie/EmulationStation/pull/792. The `RPI` build option is used only for pre-setting some program settings on the Raspberry Pi platforms (audio/video memory).
2022-05-14 19:47:02 +01:00
Jools Wills
4c99509c76 Updating modules to use the new rp_module_repo function hooks
ppsspp was incorrectly changed in 23b154b4 as it uses a subfolder which needs to be specified
2021-02-15 23:54:13 +00:00
Jools Wills
0fecb55bf6 supplementary - add rp_module_repo info for some of the supplementary packages that should with it 2021-02-15 23:54:13 +00:00
Jools Wills
c6ea3123a4 emulationstation - quick fix for emulationstation failing with opengl1.x on new vendor drivers 2021-01-21 06:56:04 +00:00
Jools Wills
acdb1ddac8 Switch to associative arrays for module data and storage
Previously all the module data was in indexed arrays with matching offsets.
Each scriptmodule folder had an initial index and it was incremented per module.

Many package functions expected an index. Indexes were never unique and could change
depending on added modules etc. We also had to convert between them and module IDs.

Now it's all done by module id. There is a numbered index of all modules found, that
increments which is used in the GUI setup menus. But it's not needed by any packaging functions.

md_idx is dropped and the few modules that used it for install checks etc now use md_id.

all packaging functions use the id.

retropie_packages.sh now accepts the module id only.
2021-01-07 05:10:02 +00:00
Jools Wills
4072e0c6cb emulationstation - systems warning format tweak
* use "config in:" and remove . from end of path
2021-01-07 04:42:02 +00:00
Jools Wills
8cd9a86b26 emulationstation - add warning when users es_systems.cfg doesn't contain an added system 2021-01-07 04:35:59 +00:00
Jools Wills
6f5e6c412e emulationstation - force building for GLESv1 on RPI with legacy drivers
simplify logic and change comment regarding RPI/KMS - emulationstation has a GLESv2 renderer
now but it needs further testing before switching to it.
2020-11-03 20:12:00 +00:00
Jools Wills
c2b616a87b emulationstation - omxplayer is not currently installable on 64bit Raspberry Pi OS
* This is due to dependency issues
2020-07-30 04:28:30 +01:00
Jools Wills
31759835b2 emulationstation - disable omxplayer dependency on osmc 2020-03-31 22:59:20 +01:00
Jools Wills
08d99e4288 runcommand - fix running software via runcommand that use X outside of Emulation Station
* if no TTY var is set (as with the ES launch script), try and get it - otherwise xinit will try and start on a VT we don't have access to
 * use a single TTY var name in emulationstation launch script
2020-03-02 02:41:16 +00:00
cmitu
e111bb914e emulationstation: fix installation on Raspbian Jessie 2020-01-07 17:03:17 +00:00
cmitu
debf605b98 emulationstation: enable the PI bits on the supported platforms 2019-12-22 16:48:09 +00:00
Jools Wills
cdcdac085b solaris / emulationstation / moonlight - use $md_mode instead of $mode
* $mode works, as parent function uses the var, but it should be $md_mode
2019-11-17 00:19:15 +00:00
Conn O'Griofa
85e6dde55c emulationstation: initial rpi mesa support
Due to the GLESv1 development headers being dropped for debian buster,
temporarily use the OpenGL driver until GLESv2 support is implemented.
Also remove the experimental driver block from the startup script.
2019-06-27 00:30:36 +01:00
Jools Wills
46385fb9af emulationstation - force v2.7.6 for Debian < 9 due to missing json dependencies 2019-03-09 04:56:57 +00:00
Jools Wills
5e727c0ddb emulationstation - added resources folder
* remove resources from emulationstation-dev.sh
2019-02-09 22:44:22 +00:00
Jools Wills
74ca715524 emulationstation - remove boost dependencies 2019-02-09 19:44:24 +00:00
Jools Wills
4fe3f72ff1 emulationstation / emulationstation-dev - added rapidjson-dev dependency 2019-02-08 16:13:46 +00:00
Jools Wills
abef070131 image - move default gpu_mem and overscan_scale settings out of the ES module and into image creation
* users may want to change these and not have them reset to defaults when updating ES.
2018-12-05 15:30:50 +00:00
Kurnia D Win
8e0be928e9 escape $ inside heredoc 2018-10-19 19:59:42 +07:00
Jools Wills
f0206c6ac0 emulationstation - remove some unneeded dependencies 2017-12-18 18:25:15 +00:00
Jools Wills
6406dd1b72 emulationstation - don't allow launching if the experimental desktop GL driver is enabled. 2017-11-23 17:22:40 +00:00
Jools Wills
105adb37e0 emulationstation - update inputAction command
* make sure inputAction is updated so switching between emulationstation / emulationstation-dev updates paths to script
2017-11-01 14:49:53 +00:00
Jools Wills
19ffb68262 emulationstation - do not remove configs
* could remove users customisations
 * causes lost configs when switching to emulationstation-dev
2017-10-10 17:09:15 +01:00
Jools Wills
8972e8a502 added emulationstation-dev to experimental which installs the very latest es code.
* make sure the hooks and add_system/del_system of es are called from emulationstation-dev
 * don't allow both modules installed at once - but don't remove configs when switching.
 * fix up retropie.svg install path when called from emulationstation-dev
2017-10-01 14:06:54 +01:00
Jools Wills
48282c3441 emulationstation - switch dependency to vlc, as vlc-nox is removed on Ubuntu 17.10+ 2017-09-30 12:15:57 +01:00
Jools Wills
705115371f emulationstation - use the new stable branch by default 2017-09-30 12:15:57 +01:00
Jools Wills
5e919438db emulationstation - use master branch again 2017-08-11 19:33:36 +01:00
Jools Wills
169ef2c81c emulationstation - force v2.4.1 until recent issues relating to the power saving mode are resolved
* ref: https://github.com/RetroPie/EmulationStation/issues/200 / https://github.com/RetroPie/EmulationStation/pull/202
2017-08-04 17:37:39 +01:00
Jools Wills
022a7af826 emulationstation - increase swap space 2017-07-08 20:43:57 +01:00
Conn
5e0ca1c031 emulationstation: sync A/B swap configuration to retroarch config
When configuring "Swap A/B buttons in ES", users will most likely
need to enable the equivalent option (menu_swap_ok_cancel_buttons)
in RetroArch. Do this automatically to minimize user confusion.
2017-05-30 23:03:53 +01:00
Jools Wills
4964a20026 emulationstation - cosmetic - repo organisation case 2017-05-22 16:49:52 +01:00