In non-windows platfoms, the `size_t` type may not necessarily use
the `%lu` format specification. For example in 32 bits platforms
instead it needs to be `%u`. Therefore, for non-windows platforms,
it is better to define PRI_SIZET more precisely.
Silences these types of warnings in 32 bits non-windows platforms:
libretro-common/file/config_file.c: In function ‘config_get_size_t’:
libretro-common/file/config_file.c:694:32: warning: format ‘%lu’ expects
argument of type ‘long unsigned int *’, but argument 3 has type
‘size_t * {aka unsigned int *}’ [-Wformat=]
if (sscanf(entry->value, "%" PRI_SIZET, &val) == 1)
^~~
Discussed in #8191
The "z" modifier was introduced in c99, but using "l" instead
seems to work.
setting_list.c: In function ‘setting_get_string_representation_size’:
setting_list.c:175:24: warning: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
snprintf(s, len, "%" PRI_SIZET,
^~~
setting_list.c: In function ‘setting_get_string_representation_size_in_mb’:
setting_list.c:183:24: warning: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
snprintf(s, len, "%" PRI_SIZET,
^~~
setting_list.c: In function ‘setting_set_with_string_representation’:
setting_list.c:508:24: warning: ISO C90 does not support the ‘z’ gnu_scanf length modifier [-Wformat=]
sscanf(value, "%" PRI_SIZET, setting->value.target.sizet);
^~~
libretro-common/file/config_file.c: In function ‘config_get_size_t’:
libretro-common/file/config_file.c:692:32: warning: ISO C90 does not support the ‘z’ gnu_scanf length modifier [-Wformat=]
if (sscanf(entry->value, "%" PRI_SIZET, &val) == 1
- remapping analogs to buttons works 100%
- remapping analogs to other analogs still messed up for some reason
- need to reset input of the original axis in input_driver.c still