mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 14:20:21 +00:00
applet: call btdrv-mitm extension function to redirect bluetooth core events while applet is running
This commit is contained in:
parent
66600e553c
commit
9cec1d752e
1 changed files with 7 additions and 0 deletions
|
@ -54,6 +54,10 @@ void userAppExit(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
Result btdrvextRedirectSystemEvents(bool steal) {
|
||||
return serviceDispatchIn(btdrvGetServiceSession(), 65000, steal);
|
||||
}
|
||||
|
||||
void appletRun(void) {
|
||||
auto applet = std::make_unique<MainApplet>();
|
||||
applet->run();
|
||||
|
@ -61,7 +65,10 @@ void appletRun(void) {
|
|||
|
||||
int main(int argc, char* argv[]) {
|
||||
appletLockExit();
|
||||
btdrvextRedirectSystemEvents(true);
|
||||
appletRun();
|
||||
btdrvextRedirectSystemEvents(false);
|
||||
appletUnlockExit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue