mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-07 10:50:35 +00:00
(XDK1) Only add autodetect pad if pad inserted
This commit is contained in:
parent
9734b606b1
commit
b5e5dc58c2
@ -57,26 +57,10 @@ static void xdk_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
|
|
||||||
static bool xdk_joypad_init(void)
|
static bool xdk_joypad_init(void)
|
||||||
{
|
{
|
||||||
unsigned autoconf_pad;
|
|
||||||
|
|
||||||
#ifdef _XBOX1
|
#ifdef _XBOX1
|
||||||
XInitDevices(0, NULL);
|
XInitDevices(0, NULL);
|
||||||
|
|
||||||
dwDeviceMask = XGetDevices(XDEVICE_TYPE_GAMEPAD);
|
|
||||||
|
|
||||||
/* Check the device status. */
|
|
||||||
switch(XGetDeviceEnumerationStatus())
|
|
||||||
{
|
|
||||||
case XDEVICE_ENUMERATION_IDLE:
|
|
||||||
RARCH_LOG("Input state status: XDEVICE_ENUMERATION_IDLE\n");
|
|
||||||
break;
|
|
||||||
case XDEVICE_ENUMERATION_BUSY:
|
|
||||||
RARCH_LOG("Input state status: XDEVICE_ENUMERATION_BUSY\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(XGetDeviceEnumerationStatus() == XDEVICE_ENUMERATION_BUSY) {}
|
|
||||||
#else
|
#else
|
||||||
|
unsigned autoconf_pad;
|
||||||
for (autoconf_pad = 0; autoconf_pad < MAX_USERS; autoconf_pad++)
|
for (autoconf_pad = 0; autoconf_pad < MAX_USERS; autoconf_pad++)
|
||||||
xdk_joypad_autodetect_add(autoconf_pad);
|
xdk_joypad_autodetect_add(autoconf_pad);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user