mirror of
https://github.com/libretro/RetroArch
synced 2025-03-09 13:13:31 +00:00
Take turbo_enable array out of global struct
This commit is contained in:
parent
f710b61edb
commit
821688f976
@ -174,6 +174,7 @@ static int16_t input_state(unsigned port, unsigned device,
|
|||||||
if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP ||
|
if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP ||
|
||||||
id > RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
id > RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||||
{
|
{
|
||||||
|
static uint16_t turbo_enable[MAX_USERS];
|
||||||
/*
|
/*
|
||||||
* Apply turbo button if activated.
|
* Apply turbo button if activated.
|
||||||
*
|
*
|
||||||
@ -183,11 +184,11 @@ static int16_t input_state(unsigned port, unsigned device,
|
|||||||
* periodic pulse defined by the configured duty cycle.
|
* periodic pulse defined by the configured duty cycle.
|
||||||
*/
|
*/
|
||||||
if (res && global->turbo.frame_enable[port])
|
if (res && global->turbo.frame_enable[port])
|
||||||
global->turbo.enable[port] |= (1 << id);
|
turbo_enable[port] |= (1 << id);
|
||||||
else if (!res)
|
else if (!res)
|
||||||
global->turbo.enable[port] &= ~(1 << id);
|
turbo_enable[port] &= ~(1 << id);
|
||||||
|
|
||||||
if (global->turbo.enable[port] & (1 << id))
|
if (turbo_enable[port] & (1 << id))
|
||||||
{
|
{
|
||||||
/* if turbo button is enabled for this key ID */
|
/* if turbo button is enabled for this key ID */
|
||||||
res = res && ((global->turbo.count % settings->input.turbo_period)
|
res = res && ((global->turbo.count % settings->input.turbo_period)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user