From 30bb3a150a7a72480a7c4426b6a976d3d489ef3d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 30 Dec 2012 22:06:52 +0100 Subject: [PATCH] (Android) Add 'unbound' message for pads which are not autoconfigured --- android/native/jni/input_android.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 5ec6a06c67..bedf4153a7 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -131,7 +131,6 @@ static void setup_keycode_lut(unsigned port, unsigned id) g_settings.input.dpad_emulation[port] = DPAD_EMULATION_LSTICK; get_device_name(name_buf, sizeof(name_buf), id); - RARCH_LOG("Device %d: %s, port: %d.\n", id, name_buf, port); /* eight 8-bit values are packed into one uint64_t * one for each of the 8 pads */ @@ -308,7 +307,14 @@ static void setup_keycode_lut(unsigned port, unsigned id) keycode_lut[AKEYCODE_ESCAPE] |= ((RARCH_QUIT_KEY+1) << shift); keycode_lut[AKEYCODE_BACK] |= ((RARCH_QUIT_KEY+1) << shift); - if (msg[0] != 0) + RARCH_LOG("Device %d: %s, port: %d.\n", id, name_buf, port); + + if (msg[0] == 0) + { + snprintf(msg, sizeof(msg), "HID [%s] unbound.\n", name_buf); + msg_queue_push(g_extern.msg_queue, msg, 0, 120); + } + else msg_queue_push(g_extern.msg_queue, msg, 0, 30); }