distribution/packages/games/emulators/flycastsa/patches/03-fix-sdl-controller.patch
Brooksytech 11cb17b3cf
Adding flycastsa (dreamcast), more optimization to follow. (#17)
* Create package.mk

* Create 01-EmuELEC-fix-arm-compile.patch

* Rename packages/games/emulators/flycastsa/patches/01-EmuELEC-fix-arm-compile.patch to packages/games/emulators/flycastsa/patches/arm/01-EmuELEC-fix-arm-compile.patch

* Create 03-EmuELEC-fix-sdl-controller.patch

* Rename packages/games/emulators/flycastsa/patches/arm/03-EmuELEC-fix-sdl-controller.patch to packages/games/emulators/flycastsa/patches/03-EmuELEC-fix-sdl-controller.patch

* Create flycast.sh

* Create set_flycast_joy.sh

* Update package.mk

* Update package.mk

* No longer need second patch.

* Update 01-EmuELEC-fix-arm-compile.patch

* Delete packages/games/emulators/flycastsa/patches/arm directory

* Update package.mk

* Create 01-fix-zip.patch

* Update 01-fix-zip.patch

* Update 01-fix-zip.patch

* Delete packages/games/emulators/flycastsa/patches/arm directory

* Update package.mk

* Update runemu.sh

* Create 01-platform.patch

* Update 03-EmuELEC-fix-sdl-controller.patch

* Update package.mk

* Update 03-EmuELEC-fix-sdl-controller.patch

* Update 03-EmuELEC-fix-sdl-controller.patch

* Update 03-EmuELEC-fix-sdl-controller.patch

* Rename 03-EmuELEC-fix-sdl-controller.patch to 03-fix-sdl-controller.patch

* Create 01-fix-zip-error.patch

* Update 01-fix-zip-error.patch

* Update 01-fix-zip-error.patch

* Update package.mk

* Delete 01-fix-zip-error.patch

* flycastsa updates

* flycastsa update2
2022-04-13 05:49:03 -07:00

16 lines
605 B
Diff

diff --git a/core/sdl/sdl.cpp b/core/sdl/sdl.cpp
index 62467d08..cb167b4f 100644
--- a/core/sdl/sdl.cpp
+++ b/core/sdl/sdl.cpp
@@ -160,6 +160,11 @@ void input_sdl_init()
#endif
std::string db = get_readonly_data_path("gamecontrollerdb.txt");
int rv = SDL_GameControllerAddMappingsFromFile(db.c_str());
+ if (rv < 0 && (nowide::getenv("SDL_GAMECONTROLLERCONFIG_FILE") != NULL))
+ {
+ db = (std::string) nowide::getenv("SDL_GAMECONTROLLERCONFIG_FILE");
+ rv = SDL_GameControllerAddMappingsFromFile(db.c_str());
+ }
if (rv < 0)
{
db = get_readonly_config_path("gamecontrollerdb.txt");