input: Controller unique mapping (preliminary)

Add ini option `unique_mapping` which makes controller mappings unique to the physical port the controller is connected to.
Calculates a uint32_t unique_hash for each device during enumeration.

Co-authored-by: Martin Donlon <github-martin@donlons.com>
This commit is contained in:
Alexey Melnikov
2023-05-21 02:14:27 +08:00
committed by GitHub
parent 9307e54f1d
commit 0ebf137532
5 changed files with 36 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ static const ini_var_t ini_vars[] =
{ "HDR_AVG_NITS", (void*)(&(cfg.hdr_avg_nits)), UINT16, 100, 10000},
{ "VGA_MODE", (void*)(&(cfg.vga_mode)), STRING, 0, sizeof(cfg.vga_mode) - 1 },
{ "NTSC_MODE", (void *)(&(cfg.ntsc_mode)), UINT8, 0, 2},
{ "UNIQUE_MAPPING", (void *)(&(cfg.unique_mapping)), UINT8, 0, 1},
};
static const int nvars = (int)(sizeof(ini_vars) / sizeof(ini_var_t));