(Android) Buildfixes and remove unused variable warnings

This commit is contained in:
twinaphex 2015-07-09 07:48:56 +02:00
parent 954121b99c
commit abf7a80f27
2 changed files with 6 additions and 5 deletions

View File

@ -914,14 +914,14 @@ static int16_t android_input_state(void *data,
static bool android_input_key_pressed(void *data, int key) static bool android_input_key_pressed(void *data, int key)
{ {
android_input_t *android = (android_input_t*)data; android_input_t *android = (android_input_t*)data;
driver_t *driver = driver_get_ptr(); input_overlay_state_t *ol_state = input_overlay_get_state_ptr();
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
if (!android) if (!android)
return false; return false;
return (driver->overlay_state.buttons return (ol_state && (ol_state->buttons
& (1ULL << key)) || input_joypad_pressed(android->joypad, & (1ULL << key))) || input_joypad_pressed(android->joypad,
0, settings->input.binds[0], key); 0, settings->input.binds[0], key);
} }

View File

@ -248,7 +248,6 @@ static INLINE void input_poll_overlay(
unsigned i, j, device; unsigned i, j, device;
uint16_t key_mod = 0; uint16_t key_mod = 0;
bool polled = false; bool polled = false;
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
input_overlay_state_t *ol_state = input_overlay_get_state_ptr(); input_overlay_state_t *ol_state = input_overlay_get_state_ptr();
@ -386,6 +385,8 @@ static void input_poll(void)
input_driver_poll(); input_driver_poll();
(void)driver;
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
if (overlay) if (overlay)
input_poll_overlay(overlay, input_poll_overlay(overlay,