mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 06:10:20 +00:00
Attempt to prevent disconnect/crash when bond completes
This commit is contained in:
parent
88d21811c4
commit
276f5ee896
2 changed files with 2 additions and 30 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue