diff --git a/nx/source/runtime/ringcon.c b/nx/source/runtime/ringcon.c index 6cf85849..8a99f92d 100644 --- a/nx/source/runtime/ringcon.c +++ b/nx/source/runtime/ringcon.c @@ -95,6 +95,7 @@ Result ringconCreate(RingCon *c, HidControllerID id) { void ringconClose(RingCon *c) { if (c->bus_initialized) { + c->bus_initialized = false; // Official sw uses hidbusDisableJoyPollingReceiveMode here, but that's redundant since hidbusEnableExternalDevice with flag=false uses that automatically. hidbusEnableExternalDevice(c->handle, false, 0x20); hidbusFinalize(c->handle); diff --git a/nx/source/services/hidbus.c b/nx/source/services/hidbus.c index c74bb568..25459cab 100644 --- a/nx/source/services/hidbus.c +++ b/nx/source/services/hidbus.c @@ -279,6 +279,7 @@ Result hidbusFinalize(HidbusBusHandle handle) { if (R_SUCCEEDED(rc)) rc = _hidbusInBusHandleResIdNoOut(&srv, handle, 4); // Finalize eventClose(&entry->event); + memset(&entry->handle, 0, sizeof(entry->handle)); _hidbusSharedmemExit(); }