virtualx-engine/core/input/SCsub
Rémi Verschelde 510e83498e Input: Drop obsolete versions of SDL gamecontrollerdb
The 204 and 205 are the older, SDL 2.0.4 and 2.0.5 compatible mappings,
but since all new mappings have only been added to the main
gamecontrollerdb.txt which overrides the older entries, it doesn't make
much sense for us to keep the old databases.

We do not support the SDL2 half axes and inverted axes features from
gamecontrollerdb.txt, but this only impacts the specific controllers
which can use those features, the rest are parsed and used properly.

As for godotcontrollerdb.txt, it doesn't make sense for us to maintain
our own custom mappings instead of submitting them upstream. The only
exception is the Javascript and UWP platforms for which no bindings are
available upstream, so we keep those entries.
2020-04-28 14:51:44 +02:00

26 lines
909 B
Python

#!/usr/bin/env python
Import("env")
from platform_methods import run_in_subprocess
import input_builders
# Order matters here. Higher index controller database files write on top of lower index database files.
controller_databases = [
"#core/input/gamecontrollerdb.txt",
"#core/input/godotcontrollerdb.txt",
]
env.Depends("#core/input/default_controller_mappings.gen.cpp", controller_databases)
env.CommandNoCache(
"#core/input/default_controller_mappings.gen.cpp",
controller_databases,
run_in_subprocess(input_builders.make_default_controller_mappings),
)
env.add_source_files(env.core_sources, "*.cpp")
# Don't warn about duplicate entry here, we need it registered manually for first build,
# even if later builds will pick it up twice due to above *.cpp globbing.
env.add_source_files(env.core_sources, "#core/input/default_controller_mappings.gen.cpp", warn_duplicates=False)