From 747badfa6c0dec616868e942802054594153670d Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 28 Sep 2014 09:05:11 +0200 Subject: [PATCH] (Apple HID) Show message queue message when disconnecting joypad --- input/hid/apple_input_hid.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/input/hid/apple_input_hid.c b/input/hid/apple_input_hid.c index ac8d84c870..c87934b4cc 100644 --- a/input/hid/apple_input_hid.c +++ b/input/hid/apple_input_hid.c @@ -95,6 +95,12 @@ static void hid_device_removed(void* context, IOReturn result, void* sender) if (connection && connection->slot < MAX_PLAYERS) { + char msg[512]; + snprintf(msg, sizeof(msg), "Joypad #%u (%s) disconnected.", + connection->slot, "N/A"); + msg_queue_push(g_extern.msg_queue, msg, 0, 60); + RARCH_LOG("[apple_input]: %s\n", msg); + g_current_input_data.pad_buttons[connection->slot] = 0; memset(g_current_input_data.pad_axis[connection->slot], 0, sizeof(g_current_input_data.pad_axis));