plutooo / nx-btred

257 stars 12 forks source link

Fix for btpair application not disabling mission control event redirection when terminated via home button press #50

Open ndeadly opened 3 years ago

ndeadly commented 3 years ago

This adds calls to appletLockExit/appletUnlockExit and moves cleanup code into a Finalize function to allow proper cleanup and disable mission control's event redirection before termination when the user exits via the home button. I believe that without this the application is force-terminated when the home button is pressed and the code in the BtPairingManager destructor is never run.

I suspect this may be the cause of the crash-on-sleep issues people have been reporting.