From 91f54ff22e21ee880c7750376885257f3dc5025b Mon Sep 17 00:00:00 2001 From: Helloman892 Date: Sat, 2 Sep 2017 15:05:18 +0100 Subject: [PATCH] Start button functionality (#21) * srvPublishToSubscriber Pressing Start from the app now sends the user to the Power Off screen. * *hax check As per Sono, checks whether the current environment is *hax. If it isn't, it goes to the home screen; otherwise, it restarts the console. * Bugfixes This may work? * Revert "Bugfixes" This reverts commit 7c382d719ac9f50af17d117f177c8bede75941f1. --- source/main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source/main.c b/source/main.c index 0cae356..f2946f1 100644 --- a/source/main.c +++ b/source/main.c @@ -86,10 +86,17 @@ int main(void) if (kDown & KEY_START) { - exit_screens(); - exit_services(); - PTMSYSM_RebootAsync(0); - ptmSysmExit(); + if(!envIsHomebrew()) + { + srvPublishToSubscriber(0x202, 0); + } + else + { + exit_screens(); + exit_services(); + PTMSYSM_RebootAsync(0); + ptmSysmExit(); + } } else if (kDown & KEY_L) {