1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-12-28 18:17:13 +00:00

Close USB interfaces only after closing USB threads

This commit is contained in:
cathery 2020-04-18 19:05:23 +03:00
parent 7d9ee7e233
commit b80d96d472
2 changed files with 8 additions and 4 deletions

View File

@ -42,13 +42,15 @@ Result SwitchAbstractedPadHandler::Initialize()
void SwitchAbstractedPadHandler::Exit()
{
m_controllerHandler.Exit();
if (DoesControllerSupport(GetController()->GetType(), SUPPORTS_NOTHING))
{
m_controllerHandler.Exit();
return;
}
ExitInputThread();
ExitOutputThread();
m_controllerHandler.Exit();
ExitAbstractedPadState();
}

View File

@ -41,13 +41,15 @@ Result SwitchHDLHandler::Initialize()
void SwitchHDLHandler::Exit()
{
m_controllerHandler.Exit();
if (DoesControllerSupport(GetController()->GetType(), SUPPORTS_NOTHING))
{
m_controllerHandler.Exit();
return;
}
ExitInputThread();
ExitOutputThread();
m_controllerHandler.Exit();
ExitHdlState();
}