]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fix some mistakes in 2797540a
authorfincs <fincs.alt1@gmail.com>
Sat, 7 Nov 2015 00:52:35 +0000 (01:52 +0100)
committerfincs <fincs.alt1@gmail.com>
Sat, 7 Nov 2015 00:52:35 +0000 (01:52 +0100)
libctru/source/services/apt.c
libctru/source/services/cam.c
libctru/source/services/csnd.c

index 62c8c08809ef6544b33dc7ff35bf2a2d4ed199d4..36ab4c418276217aebad42ba7416499df486e878 100644 (file)
@@ -495,7 +495,7 @@ Result aptInit(void)
                }
                
                aptOpenSession();
-               if(R_FAILED(ret=APT_NotifyToWait(currentAppId)))return ret;
+               if(R_FAILED(ret=APT_NotifyToWait(currentAppId)))goto _fail;
                aptCloseSession();
 
                // create APT event handler thread
index 2439bb0728204d6d8887945542a529ab0e77b12d..1382e283136dae292d8aeeb5dc850636d8206a78 100644 (file)
@@ -22,7 +22,7 @@ Result camInit(void) {
        }
        if (R_FAILED(ret)) AtomicDecrement(&camRefCount);
 
-       return 0;
+       return ret;
 }
 
 void camExit(void) {
index 5a1ffa927ae315eba640a8c6f55da673c219c4a4..69d07b7ecdfbe7fb69b4943c8d0632dd7b404f4f 100644 (file)
@@ -152,7 +152,7 @@ Result csndInit(void)
        memset((void*)csndSharedMem, 0, csndSharedMemSize);
 
        ret = CSND_AcquireSoundChannels(&csndChannels);
-       if (R_FAILED(ret)) return 0;
+       if (R_SUCCEEDED(ret)) return 0;
 
 cleanup2:
        svcCloseHandle(csndSharedMemBlock);