mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Add some more error logging to dinput.
This commit is contained in:
parent
b584964c2b
commit
2c60dfb8cf
@ -110,14 +110,27 @@ static void *dinput_init(void)
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysKeyboard, &di->keyboard, NULL)))
|
if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysKeyboard, &di->keyboard, NULL)))
|
||||||
|
{
|
||||||
|
RARCH_ERR("Failed to create keyboard device.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysMouse, &di->mouse, NULL)))
|
if (FAILED(IDirectInput8_CreateDevice(g_ctx, GUID_SysMouse, &di->mouse, NULL)))
|
||||||
|
{
|
||||||
|
RARCH_ERR("Failed to create mouse device.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysKeyboard, &di->keyboard, NULL)))
|
if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysKeyboard, &di->keyboard, NULL)))
|
||||||
|
{
|
||||||
|
RARCH_ERR("Failed to create keyboard device.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysMouse, &di->mouse, NULL)))
|
if (FAILED(IDirectInput8_CreateDevice(g_ctx, &GUID_SysMouse, &di->mouse, NULL)))
|
||||||
|
{
|
||||||
|
RARCH_ERR("Failed to create mouse device.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IDirectInputDevice8_SetDataFormat(di->keyboard, &c_dfDIKeyboard);
|
IDirectInputDevice8_SetDataFormat(di->keyboard, &c_dfDIKeyboard);
|
||||||
@ -136,6 +149,7 @@ static void *dinput_init(void)
|
|||||||
return di;
|
return di;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
RARCH_ERR("Failed to start DirectInput driver.\n");
|
||||||
dinput_destroy_context();
|
dinput_destroy_context();
|
||||||
free(di);
|
free(di);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user