mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
(Apple) Fix mapping of gamepad negative axis; the input binding menu now polls the proper gamepad rather than always polling player 1’s.
This commit is contained in:
parent
693a826f2f
commit
4c493ae9b4
@ -137,13 +137,14 @@ static const void* associated_name_tag = (void*)&associated_name_tag;
|
||||
- (void)checkBind:(NSTimer*)send
|
||||
{
|
||||
int32_t value = 0;
|
||||
int32_t index = _setting->index ? _setting->index - 1 : 0;
|
||||
|
||||
if ((value = apple_input_find_any_key()))
|
||||
BINDFOR(*_setting).key = input_translate_keysym_to_rk(value);
|
||||
else if ((value = apple_input_find_any_button(0)) >= 0)
|
||||
else if ((value = apple_input_find_any_button(index)) >= 0)
|
||||
BINDFOR(*_setting).joykey = value;
|
||||
else if ((value = apple_input_find_any_axis(0)))
|
||||
BINDFOR(*_setting).joyaxis = (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(value - 1);
|
||||
else if ((value = apple_input_find_any_axis(index)))
|
||||
BINDFOR(*_setting).joyaxis = (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1);
|
||||
else
|
||||
return;
|
||||
|
||||
|
@ -400,13 +400,14 @@ static void RunActionSheet(const char* title, const struct string_list* items, U
|
||||
- (void)checkBind:(NSTimer*)send
|
||||
{
|
||||
int32_t value = 0;
|
||||
int32_t index = self.setting->index ? self.setting->index - 1 : 0;
|
||||
|
||||
if ((value = apple_input_find_any_key()))
|
||||
BINDFOR(*self.setting).key = input_translate_keysym_to_rk(value);
|
||||
else if ((value = apple_input_find_any_button(0)) >= 0)
|
||||
else if ((value = apple_input_find_any_button(index)) >= 0)
|
||||
BINDFOR(*self.setting).joykey = value;
|
||||
else if ((value = apple_input_find_any_axis(0)))
|
||||
BINDFOR(*self.setting).joyaxis = (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(value - 1);
|
||||
else if ((value = apple_input_find_any_axis(index)))
|
||||
BINDFOR(*self.setting).joyaxis = (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1);
|
||||
else
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user