Revert "Take turbo_enable array out of global struct"

This reverts commit 821688f976b1c9cc3ce423445144d24d92d6a73c.
This commit is contained in:
twinaphex 2015-08-03 23:40:01 +02:00
parent 821688f976
commit 1e344bc85c
2 changed files with 4 additions and 4 deletions

View File

@ -174,7 +174,6 @@ static int16_t input_state(unsigned port, unsigned device,
if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP ||
id > RETRO_DEVICE_ID_JOYPAD_RIGHT))
{
static uint16_t turbo_enable[MAX_USERS];
/*
* Apply turbo button if activated.
*
@ -184,11 +183,11 @@ static int16_t input_state(unsigned port, unsigned device,
* periodic pulse defined by the configured duty cycle.
*/
if (res && global->turbo.frame_enable[port])
turbo_enable[port] |= (1 << id);
global->turbo.enable[port] |= (1 << id);
else if (!res)
turbo_enable[port] &= ~(1 << id);
global->turbo.enable[port] &= ~(1 << id);
if (turbo_enable[port] & (1 << id))
if (global->turbo.enable[port] & (1 << id))
{
/* if turbo button is enabled for this key ID */
res = res && ((global->turbo.count % settings->input.turbo_period)

View File

@ -201,6 +201,7 @@ typedef struct global
struct
{
bool frame_enable[MAX_USERS];
uint16_t enable[MAX_USERS];
unsigned count;
} turbo;