]> Chaos Git - corbenik/ctrulib.git/commitdiff
am:sys stuff, g_serv_handle non static and qtm example label
authorsmea <smealum@gmail.com>
Tue, 18 Aug 2015 04:31:00 +0000 (21:31 -0700)
committersmea <smealum@gmail.com>
Tue, 18 Aug 2015 04:31:00 +0000 (21:31 -0700)
examples/qtm/Makefile
libctru/source/services/am.c
libctru/source/srv.c

index c36642862676a80eda0ee4f8003184394cfecec8..7606ca6ce45d82a7cca439f81584a0d6475c8325 100644 (file)
@@ -32,6 +32,10 @@ SOURCES              :=      source
 DATA           :=      data
 INCLUDES       :=      include
 
+APP_TITLE := Head tracking demo
+APP_DESCRIPTION := This is a small demo app for the New 3DS head tracking.
+APP_AUTHOR := yellows8
+
 #---------------------------------------------------------------------------------
 # options for code generation
 #---------------------------------------------------------------------------------
index 7830651c11dbcde8a4ba15e9d8426f1dc8287b54..f6334dde8b95af5e505b3b93b853c8ac3e560d83 100644 (file)
@@ -12,8 +12,11 @@ Result amInit()
 {
        if(srvGetServiceHandle(&amHandle, "am:net") == 0)
                return (Result)0;
-       else
-               return srvGetServiceHandle(&amHandle, "am:u");
+       else if(srvGetServiceHandle(&amHandle, "am:u") == 0)
+               return (Result)0;
+       else if(srvGetServiceHandle(&amHandle, "am:sys") == 0)
+               return (Result)0;
+       else return srvGetServiceHandle(&amHandle, "am:app");
 }
 
 Result amExit()
index 224371716341120690ab257854e3963480a23f9a..ca404dd5099674e9e9bf87b340bf641bae1c6d67 100644 (file)
@@ -30,7 +30,8 @@ typedef struct {
 
 extern service_list_t* __service_ptr;
 
-static Handle g_srv_handle = 0;
+// not static so that apps can actually access it if need be
+Handle g_srv_handle = 0;
 
 
 static int __name_cmp(const char* a, const char* b) {