wiiu/input: Give static variables unique names

For griffin build, where static is meaningless
This commit is contained in:
Ash Logan 2019-05-27 22:11:30 +10:00
parent e2c479987c
commit 9a89aebe73
3 changed files with 13 additions and 13 deletions

View File

@ -25,7 +25,7 @@ static int16_t hidpad_axis(unsigned pad, uint32_t axis);
static void hidpad_poll(void);
static const char *hidpad_name(unsigned pad);
static bool ready = false;
static bool hidpad_ready = false;
static bool init_hid_driver(void)
{
@ -44,19 +44,19 @@ static bool hidpad_init(void *data)
}
hidpad_poll();
ready = true;
hidpad_ready = true;
return true;
}
static bool hidpad_query_pad(unsigned pad)
{
return ready && pad < MAX_USERS;
return hidpad_ready && pad < MAX_USERS;
}
static void hidpad_destroy(void)
{
ready = false;
hidpad_ready = false;
hid_deinit(&hid_instance);
}
@ -87,7 +87,7 @@ static int16_t hidpad_axis(unsigned pad, uint32_t axis)
static void hidpad_poll(void)
{
if (ready)
if (hidpad_ready)
HID_POLL();
}

View File

@ -41,7 +41,7 @@ struct _wiimote_state
uint8_t type;
};
static bool ready = false;
static bool kpad_ready = false;
/* it would be nice to use designated initializers here,
* but those are only in C99 and newer. Oh well.
@ -84,17 +84,17 @@ static bool kpad_init(void *data)
(void *)data;
kpad_poll();
ready = true;
kpad_ready = true;
}
static bool kpad_query_pad(unsigned pad)
{
return ready && pad < MAX_USERS;
return kpad_ready && pad < MAX_USERS;
}
static void kpad_destroy(void)
{
ready = false;
kpad_ready = false;
}
static bool kpad_button(unsigned pad, uint16_t button_bit)

View File

@ -25,7 +25,7 @@
#define PANIC_BUTTON_MASK (VPAD_BUTTON_R | VPAD_BUTTON_L | VPAD_BUTTON_STICK_R | VPAD_BUTTON_STICK_L)
static bool ready = false;
static bool wpad_ready = false;
static uint64_t button_state = 0;
static int16_t analog_state[3][2];
@ -190,19 +190,19 @@ static bool wpad_init(void *data)
hid_instance.pad_list[slot].connected = true;
input_pad_connect(slot, &wpad_driver);
wpad_poll();
ready = true;
wpad_ready = true;
return true;
}
static bool wpad_query_pad(unsigned pad)
{
return ready && pad < MAX_USERS;
return wpad_ready && pad < MAX_USERS;
}
static void wpad_destroy(void)
{
ready = false;
wpad_ready = false;
}
static bool wpad_button(unsigned pad, uint16_t button_bit)