applet: call btdrv-mitm extension function to redirect bluetooth core events while applet is running

This commit is contained in:
ndeadly 2020-06-02 23:27:57 +02:00
parent 66600e553c
commit 9cec1d752e

View file

@ -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;
}