mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
get_bind_string_joyaxis - small simplification
This commit is contained in:
parent
d6ae25d980
commit
e5ef309b58
@ -3180,12 +3180,13 @@ void input_config_get_bind_string_joyaxis(
|
||||
bind->joyaxis_label, suffix, ' ', size);
|
||||
else
|
||||
{
|
||||
size_t _len = strlcpy(buf, "Axis ", size);
|
||||
if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||
snprintf(buf, size, "%s-%u",
|
||||
"Axis ", (unsigned)AXIS_NEG_GET(bind->joyaxis));
|
||||
snprintf(buf + _len, size - _len, "-%u",
|
||||
(unsigned)AXIS_NEG_GET(bind->joyaxis));
|
||||
else if (AXIS_POS_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||
snprintf(buf, size, "%s+%u",
|
||||
"Axis ", (unsigned)AXIS_POS_GET(bind->joyaxis));
|
||||
snprintf(buf + _len, size - _len, "+%u",
|
||||
(unsigned)AXIS_POS_GET(bind->joyaxis));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user