mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
Turn input_pop_analog_dpad into macro
This commit is contained in:
parent
59c317dc1d
commit
c19a6dd018
@ -306,20 +306,6 @@ void input_push_analog_dpad(struct retro_keybind *binds, unsigned mode)
|
||||
binds[i].joyaxis = binds[j--].joyaxis;
|
||||
}
|
||||
|
||||
/**
|
||||
* input_pop_analog_dpad:
|
||||
* @binds : Binds to modify.
|
||||
*
|
||||
* Restores binds temporarily overridden by input_push_analog_dpad().
|
||||
**/
|
||||
void input_pop_analog_dpad(struct retro_keybind *binds)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = RETRO_DEVICE_ID_JOYPAD_UP; i <= RETRO_DEVICE_ID_JOYPAD_RIGHT; i++)
|
||||
binds[i].joyaxis = binds[i].orig_joyaxis;
|
||||
}
|
||||
|
||||
/**
|
||||
* input_translate_coord_viewport:
|
||||
* @mouse_x : Pointer X coordinate.
|
||||
|
@ -197,7 +197,12 @@ void input_push_analog_dpad(struct retro_keybind *binds, unsigned mode);
|
||||
*
|
||||
* Restores binds temporarily overridden by input_push_analog_dpad().
|
||||
**/
|
||||
void input_pop_analog_dpad(struct retro_keybind *binds);
|
||||
#define input_pop_analog_dpad(binds) \
|
||||
{ \
|
||||
unsigned i; \
|
||||
for (i = RETRO_DEVICE_ID_JOYPAD_UP; i <= RETRO_DEVICE_ID_JOYPAD_RIGHT; i++) \
|
||||
(binds)[i].joyaxis = (binds)[i].orig_joyaxis; \
|
||||
}
|
||||
|
||||
/**
|
||||
* input_poll:
|
||||
|
Loading…
Reference in New Issue
Block a user