From 2c60dfb8cf5db25f275c5c3302cc17dfcebb743a Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 11 Jan 2014 18:09:03 +0100 Subject: [PATCH] Add some more error logging to dinput. --- input/dinput.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/input/dinput.c b/input/dinput.c index 3fb9a7c615..ba8246dbe3 100644 --- a/input/dinput.c +++ b/input/dinput.c @@ -110,14 +110,27 @@ static void *dinput_init(void) #ifdef __cplusplus if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysKeyboard, &di->keyboard, NULL))) + { + RARCH_ERR("Failed to create keyboard device.\n"); goto error; + } + if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysMouse, &di->mouse, NULL))) + { + RARCH_ERR("Failed to create mouse device.\n"); goto error; + } #else if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysKeyboard, &di->keyboard, NULL))) + { + RARCH_ERR("Failed to create keyboard device.\n"); goto error; + } if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysMouse, &di->mouse, NULL))) + { + RARCH_ERR("Failed to create mouse device.\n"); goto error; + } #endif IDirectInputDevice8_SetDataFormat(di->keyboard, &c_dfDIKeyboard); @@ -136,6 +149,7 @@ static void *dinput_init(void) return di; error: + RARCH_ERR("Failed to start DirectInput driver.\n"); dinput_destroy_context(); free(di); return NULL;