Attempt to prevent disconnect/crash when bond completes

This commit is contained in:
ndeadly 2020-06-10 00:21:51 +02:00
parent 88d21811c4
commit 276f5ee896
2 changed files with 2 additions and 30 deletions

View file

@ -125,36 +125,10 @@ namespace mc::bluetooth::core {
if R_FAILED(rc)
fatalThrow(rc);
// Add device to the controller database
//rc = controllerDatabase->addDevice(&device);
/*
// Disconnect controller
rc = btdrvCloseHidConnection(address);
if R_FAILED(rc)
fatalThrow(rc);
svcSleepThread(2e8);
rc = btdrvRemoveBond(address);
if R_FAILED(rc)
fatalThrow(rc);
svcSleepThread(2e8);
// Register device with btm module
// Register device with btm module1
rc = registerDevice(&device);
if R_FAILED(rc)
fatalThrow(rc);
svcSleepThread(1e9);
//rc = btdrvOpenHidConnection(address);
rc = btmdbgHidConnect(address);
if R_FAILED(rc)
fatalThrow(rc);
*/
}
break;

View file

@ -431,16 +431,14 @@ namespace ams::mitm::btdrv {
}
// Signal our forwarder events
os::SignalSystemEvent(&g_btHidSystemEventFwd);
//os::SignalSystemEvent(&g_btHidSystemEventFwd);
/*
if (!g_redirectEvents || g_preparingForSleep) {
os::SignalSystemEvent(&g_btHidSystemEventFwd);
}
else {
os::SignalSystemEvent(&g_btHidSystemEventUser);
}
*/
}
}