From cc1e83e95461f1f83c17ab9286bb7791209fe906 Mon Sep 17 00:00:00 2001 From: cathery Date: Tue, 5 Nov 2019 11:59:08 +0300 Subject: [PATCH] Changed hdl removal check because the previous one was too late to update --- SwitchUSB/source/SwitchHDLHandler.cpp | 4 ++-- SwitchUSB/source/SwitchUSBInterface.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SwitchUSB/source/SwitchHDLHandler.cpp b/SwitchUSB/source/SwitchHDLHandler.cpp index a78bc56..a79c059 100644 --- a/SwitchUSB/source/SwitchHDLHandler.cpp +++ b/SwitchUSB/source/SwitchHDLHandler.cpp @@ -115,8 +115,8 @@ Result SwitchHDLHandler::UpdateHdlState() { //Checks if the virtual device was erased, in which case re-attach the device bool found_flag = false; - HiddbgHdlsNpadAssignment list; - hiddbgDumpHdlsNpadAssignmentState(&list); + HiddbgHdlsStateList list; + hiddbgDumpHdlsStates(&list); for (int i = 0; i != list.total_entries; ++i) { if (list.entries[i].HdlsHandle == m_hdlHandle) diff --git a/SwitchUSB/source/SwitchUSBInterface.cpp b/SwitchUSB/source/SwitchUSBInterface.cpp index 1e72690..942b92b 100644 --- a/SwitchUSB/source/SwitchUSBInterface.cpp +++ b/SwitchUSB/source/SwitchUSBInterface.cpp @@ -54,7 +54,6 @@ void SwitchUSBInterface::Close() if (endpoint) { endpoint->Close(); - endpoint.release(); } } for (auto &&endpoint : m_outEndpoints) @@ -62,7 +61,6 @@ void SwitchUSBInterface::Close() if (endpoint) { endpoint->Close(); - endpoint.release(); } } usbHsIfClose(&m_session);