Skip to content

Commit

Permalink
Gamepad: Fix parsing order for SDL2 controller databases
Browse files Browse the repository at this point in the history
We were overriding values from `gamecontrollerdb.txt` (current, updated
upstream) with `gamecontrollerdb_205.txt` (legacy, SDL 2.0.5) and then
`gamecontrollerdb_204.txt` (legacy, SDL 2.0.4).

There was a comment to warn about this but it seems it did not prevent
using the wrong order for all this time...

Now `gamecontrollerdb.txt` mappings will properly override outdated
ones present in the `204` and `205` variants.
  • Loading branch information
akien-mga committed Jan 8, 2020
1 parent ae21664 commit 0749906
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ env.main_sources = []

env.add_source_files(env.main_sources, "*.cpp")

# order matters here. higher index controller database files write on top of lower index database files
controller_databases = ["#main/gamecontrollerdb.txt", "#main/gamecontrollerdb_205.txt", "#main/gamecontrollerdb_204.txt", "#main/godotcontrollerdb.txt"]
# Order matters here. Higher index controller database files write on top of lower index database files.
controller_databases = ["#main/gamecontrollerdb_204.txt", "#main/gamecontrollerdb_205.txt", "#main/gamecontrollerdb.txt", "#main/godotcontrollerdb.txt"]

env.Depends("#main/default_controller_mappings.gen.cpp", controller_databases)
env.CommandNoCache("#main/default_controller_mappings.gen.cpp", controller_databases, run_in_subprocess(main_builders.make_default_controller_mappings))
Expand Down

0 comments on commit 0749906

Please sign in to comment.