From 56fe877f1410f7ebc15f20805e4e0d79ae7b5718 Mon Sep 17 00:00:00 2001 From: HookedBehemoth Date: Sat, 21 Dec 2019 00:53:58 +0100 Subject: [PATCH] fix typos, move struct --- nx/include/switch/services/caps.h | 5 +++++ nx/include/switch/services/capsa.h | 13 ++++--------- nx/source/services/capsa.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nx/include/switch/services/caps.h b/nx/include/switch/services/caps.h index 09bb0bb1..be34e8c3 100644 --- a/nx/include/switch/services/caps.h +++ b/nx/include/switch/services/caps.h @@ -22,6 +22,11 @@ typedef enum { AlbumReportOption_Enable = 1, ///< Display the screenshot-taken Overlay notification. } AlbumReportOption; +typedef enum { + AlbumObjectLocation_BuiltInUser = 0, ///< BuiltInUser + AlbumObjectLocation_SdCard = 1, ///< SdCard +} AlbumObjectLocation; + /// ContentType typedef enum { CapsContentType_Screenshot = 0, ///< Album screenshots. diff --git a/nx/include/switch/services/capsa.h b/nx/include/switch/services/capsa.h index 209c518b..990cda7a 100644 --- a/nx/include/switch/services/capsa.h +++ b/nx/include/switch/services/capsa.h @@ -1,5 +1,5 @@ /** - * @file capsu.h + * @file capsa.h * @brief Album Accessor (caps:a) service IPC wrapper. * @author Behemoth * @copyright libnx Authors @@ -9,19 +9,14 @@ #include "../sf/service.h" #include "../services/caps.h" -typedef enum { - AlbumObjectLocation_BuiltInUser = 0, - AlbumObjectLocation_SdCard = 1, -} AlbumObjectLocation; - /// Initialize caps:a. Result capsaInitialize(void); /// Exit caps:a. void capsaExit(void); -/// Gets the Service for caps:u. -Service* capsuGetServiceSession(void); +/// Gets the Service for caps:a. +Service* capsaGetServiceSession(void); Result capsaGetAlbumFileCount(AlbumObjectLocation location, u64* count); Result capsaGetAlbumFileList(AlbumObjectLocation location, u64* count, CapsApplicationAlbumEntry* buffer, u64 size); @@ -31,4 +26,4 @@ Result capsaStorageCopyAlbumFile(u8 unk[0x20]); Result capsaIsAlbumMounted(AlbumObjectLocation location, bool* is_mounted); Result capsaGetAlbumUsage(AlbumObjectLocation location, u8 unk_out[0x30]); Result capsaGetAlbumFileSize(CapsAlbumEntryId entry_id, u64* size); -Result capsLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size); +Result capsaLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size); diff --git a/nx/source/services/capsa.c b/nx/source/services/capsa.c index cb012e4e..a83d042b 100644 --- a/nx/source/services/capsa.c +++ b/nx/source/services/capsa.c @@ -18,7 +18,7 @@ void _capsaCleanup(void) { serviceClose(&g_capsaSrv); } -Service* capsuGetServiceSession(void) { +Service* capsaGetServiceSession(void) { return &g_capsaSrv; } @@ -60,7 +60,7 @@ Result capsaGetAlbumFileSize(CapsAlbumEntryId entry_id, u64* size) { return serviceDispatchInOut(&g_capsaSrv, 7, entry_id, *size); } -Result capsLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size) { +Result capsaLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size) { return serviceDispatchInOut(&g_capsaSrv, 8, entry_id, *unk, .buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out }, .buffers = { { jpeg_buffer, jpeg_buffer_size } },