From 5a070f624c655923dc79f391ad8799acb3e3e15a Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Sun, 6 Dec 2020 18:45:30 -0400 Subject: [PATCH] Use UsbState enum values from latest libnx. --- source/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/usb.c b/source/usb.c index 0ff15a4..796eddf 100644 --- a/source/usb.c +++ b/source/usb.c @@ -1133,9 +1133,9 @@ static bool usbInitializeDeviceInterface1x(void) NX_INLINE bool usbIsHostAvailable(void) { - u32 state = 0; + UsbState state = UsbState_Detached; Result rc = usbDsGetState(&state); - return (R_SUCCEEDED(rc) && state == 5); + return (R_SUCCEEDED(rc) && state == UsbState_Configured); } NX_INLINE void usbSetZltPacket(bool enable)