WerWolv / libtesla

The support library for Tesla overlays
GNU General Public License v2.0
218 stars 49 forks source link

Should allow userAppInit and userAppExit #31

Closed nedex closed 4 years ago

nedex commented 4 years ago

Hello there. Since i'm using extra services, like socket and nifm, it would be great if an user could define custom additional services initialization to their overlays, as it happens here (userAppInit and userAppExit): https://github.com/switchbrew/libnx/blob/master/nx/source/runtime/init.c#L102

At the time of writing i have to modify the tesla.hpp file. Thanks!

nedex commented 4 years ago

Nevermind, I just found out about initServices and exitServices. Another question, why is it needed to call smExit in doWithSmSession ?

I have to call smInitialize anyways, otherwise the getaddrinfo function will fail..

WerWolv commented 4 years ago

initServices already has it initialized. But yeah, you should use the tsl::hlp::doWithSMSession function whenever you need to initialize a service anywhere outside of initServices. This is done so other services don't run out on sm sessions themselves when launched after tesla