mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +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;
|
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:
|
* input_translate_coord_viewport:
|
||||||
* @mouse_x : Pointer X coordinate.
|
* @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().
|
* 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:
|
* input_poll:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user