From a2af1728729b074787a812a8153b36ee187010bd Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Wed, 27 Jul 2016 17:49:43 -0700 Subject: [PATCH] Have helloworld sample exit immediately using sysapp --- samples/helloworld/Makefile | 2 +- samples/helloworld/src/main.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/helloworld/Makefile b/samples/helloworld/Makefile index a914be8..15f4008 100644 --- a/samples/helloworld/Makefile +++ b/samples/helloworld/Makefile @@ -18,7 +18,7 @@ BUILD := build SOURCE := src INCLUDE := include DATA := data -LIBS := -lcoreinit -lproc_ui +LIBS := -lcoreinit -lproc_ui -lsysapp CFLAGS += -O2 -Wall -std=c11 CXXFLAGS += -O2 -Wall diff --git a/samples/helloworld/src/main.c b/samples/helloworld/src/main.c index b738347..22be22e 100644 --- a/samples/helloworld/src/main.c +++ b/samples/helloworld/src/main.c @@ -3,6 +3,7 @@ #include #include #include +#include bool isAppRunning = true; @@ -82,6 +83,10 @@ main(int argc, char **argv) OSReport("Core 0 thread returned %d", resultCore0); OSReport("Core 2 thread returned %d", resultCore2); + // Sends messages for ProcUI to release foreground, exit + // and launch into the system menu immediately. + SYSLaunchMenu(); + while(AppRunning()); return 0; }