From 9cec1d752ecd298cce1be4af548372111ed6b2be Mon Sep 17 00:00:00 2001 From: ndeadly <24677491+ndeadly@users.noreply.github.com> Date: Tue, 2 Jun 2020 23:27:57 +0200 Subject: [PATCH] applet: call btdrv-mitm extension function to redirect bluetooth core events while applet is running --- applet/source/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/applet/source/main.cpp b/applet/source/main.cpp index 6a1b0e9..0100800 100644 --- a/applet/source/main.cpp +++ b/applet/source/main.cpp @@ -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(); applet->run(); @@ -61,7 +65,10 @@ void appletRun(void) { int main(int argc, char* argv[]) { appletLockExit(); + btdrvextRedirectSystemEvents(true); appletRun(); + btdrvextRedirectSystemEvents(false); appletUnlockExit(); + return 0; }