diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/caps/caps.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps.h | 76 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_a.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_a.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_c.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_c.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_sc.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_sc.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_ss.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_ss.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_su.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_su.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_u.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps_u.h | 2 |
14 files changed, 69 insertions, 57 deletions
diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp index 26c8a7081..ba5749b84 100644 --- a/src/core/hle/service/caps/caps.cpp +++ b/src/core/hle/service/caps/caps.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | 1 | // Copyright 2018 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps.h b/src/core/hle/service/caps/caps.h index fc70a4c27..b8c67b6e2 100644 --- a/src/core/hle/service/caps/caps.h +++ b/src/core/hle/service/caps/caps.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | 1 | // Copyright 2018 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -12,73 +12,79 @@ class ServiceManager; | |||
| 12 | 12 | ||
| 13 | namespace Service::Capture { | 13 | namespace Service::Capture { |
| 14 | 14 | ||
| 15 | enum AlbumImageOrientation { | 15 | enum class AlbumImageOrientation { |
| 16 | Orientation0 = 0, | 16 | Orientation0 = 0, |
| 17 | Orientation1 = 1, | 17 | Orientation1 = 1, |
| 18 | Orientation2 = 2, | 18 | Orientation2 = 2, |
| 19 | Orientation3 = 3, | 19 | Orientation3 = 3, |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | enum AlbumReportOption { | 22 | enum class AlbumReportOption { |
| 23 | Disable = 0, | 23 | Disable = 0, |
| 24 | Enable = 1, | 24 | Enable = 1, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | enum ContentType : u8 { | 27 | enum class ContentType : u8 { |
| 28 | Screenshot = 0, | 28 | Screenshot = 0, |
| 29 | Movie = 1, | 29 | Movie = 1, |
| 30 | ExtraMovie = 3, | 30 | ExtraMovie = 3, |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | enum AlbumStorage : u8 { | 33 | enum class AlbumStorage : u8 { |
| 34 | NAND = 0, | 34 | NAND = 0, |
| 35 | SD = 1, | 35 | SD = 1, |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | struct AlbumFileDateTime { | 38 | struct AlbumFileDateTime { |
| 39 | u16 year; | 39 | s16 year{}; |
| 40 | u8 month; | 40 | s8 month{}; |
| 41 | u8 day; | 41 | s8 day{}; |
| 42 | u8 hour; | 42 | s8 hour{}; |
| 43 | u8 minute; | 43 | s8 minute{}; |
| 44 | u8 second; | 44 | s8 second{}; |
| 45 | u8 uid; | 45 | s8 uid{}; |
| 46 | }; | 46 | }; |
| 47 | static_assert(sizeof(AlbumFileDateTime) == 0x8, "AlbumFileDateTime has incorrect size."); | ||
| 47 | 48 | ||
| 48 | struct AlbumEntry { | 49 | struct AlbumEntry { |
| 49 | u64 size; | 50 | u64 size{}; |
| 50 | u64 application_id; | 51 | u64 application_id{}; |
| 51 | AlbumFileDateTime datetime; | 52 | AlbumFileDateTime datetime{}; |
| 52 | AlbumStorage storage; | 53 | AlbumStorage storage{}; |
| 53 | ContentType content; | 54 | ContentType content{}; |
| 54 | u8 padding[6]; | 55 | INSERT_PADDING_BYTES(6); |
| 55 | }; | 56 | }; |
| 57 | static_assert(sizeof(AlbumEntry) == 0x20, "AlbumEntry has incorrect size."); | ||
| 56 | 58 | ||
| 57 | struct AlbumFileEntry { | 59 | struct AlbumFileEntry { |
| 58 | u64 size; | 60 | u64 size{}; // Size of the entry |
| 59 | u64 hash; | 61 | u64 hash{}; // AES256 with hardcoded key over AlbumEntry |
| 60 | AlbumFileDateTime datetime; | 62 | AlbumFileDateTime datetime{}; |
| 61 | AlbumStorage storage; | 63 | AlbumStorage storage{}; |
| 62 | ContentType content; | 64 | ContentType content{}; |
| 63 | u8 padding[5]; | 65 | INSERT_PADDING_BYTES(5); |
| 64 | u8 unknown; | 66 | u8 unknown{1}; // Set to 1 on official SW |
| 65 | }; | 67 | }; |
| 68 | static_assert(sizeof(AlbumFileEntry) == 0x20, "AlbumFileEntry has incorrect size."); | ||
| 66 | 69 | ||
| 67 | struct ApplicationAlbumEntry { | 70 | struct ApplicationAlbumEntry { |
| 68 | u64 size; | 71 | u64 size{}; // Size of the entry |
| 69 | u64 hash; | 72 | u64 hash{}; // AES256 with hardcoded key over AlbumEntry |
| 70 | AlbumFileDateTime datetime; | 73 | AlbumFileDateTime datetime{}; |
| 71 | AlbumStorage storage; | 74 | AlbumStorage storage{}; |
| 72 | ContentType content; | 75 | ContentType content{}; |
| 73 | u8 padding[5]; | 76 | INSERT_PADDING_BYTES(5); |
| 74 | u8 unknown; | 77 | u8 unknown{1}; // Set to 1 on official SW |
| 75 | }; | 78 | }; |
| 79 | static_assert(sizeof(ApplicationAlbumEntry) == 0x20, "ApplicationAlbumEntry has incorrect size."); | ||
| 76 | 80 | ||
| 77 | struct ApplicationAlbumFileEntry { | 81 | struct ApplicationAlbumFileEntry { |
| 78 | ApplicationAlbumEntry entry; | 82 | ApplicationAlbumEntry entry{}; |
| 79 | AlbumFileDateTime datetime; | 83 | AlbumFileDateTime datetime{}; |
| 80 | u64 unknown; | 84 | u64 unknown{}; |
| 81 | }; | 85 | }; |
| 86 | static_assert(sizeof(ApplicationAlbumFileEntry) == 0x30, | ||
| 87 | "ApplicationAlbumFileEntry has incorrect size."); | ||
| 82 | 88 | ||
| 83 | /// Registers all Capture services with the specified service manager. | 89 | /// Registers all Capture services with the specified service manager. |
| 84 | void InstallInterfaces(SM::ServiceManager& sm); | 90 | void InstallInterfaces(SM::ServiceManager& sm); |
diff --git a/src/core/hle/service/caps/caps_a.cpp b/src/core/hle/service/caps/caps_a.cpp index 88a3fdc05..a0a3b2ae3 100644 --- a/src/core/hle/service/caps/caps_a.cpp +++ b/src/core/hle/service/caps/caps_a.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_a.h b/src/core/hle/service/caps/caps_a.h index 8de832491..cb93aad5b 100644 --- a/src/core/hle/service/caps/caps_a.h +++ b/src/core/hle/service/caps/caps_a.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_c.cpp b/src/core/hle/service/caps/caps_c.cpp index ea6452ffa..ab17a187e 100644 --- a/src/core/hle/service/caps/caps_c.cpp +++ b/src/core/hle/service/caps/caps_c.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_c.h b/src/core/hle/service/caps/caps_c.h index d07cdb441..a9d028689 100644 --- a/src/core/hle/service/caps/caps_c.h +++ b/src/core/hle/service/caps/caps_c.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_sc.cpp b/src/core/hle/service/caps/caps_sc.cpp index d01a8a58e..822ee96c8 100644 --- a/src/core/hle/service/caps/caps_sc.cpp +++ b/src/core/hle/service/caps/caps_sc.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_sc.h b/src/core/hle/service/caps/caps_sc.h index 9ba372f7a..ac3e929ca 100644 --- a/src/core/hle/service/caps/caps_sc.h +++ b/src/core/hle/service/caps/caps_sc.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_ss.cpp b/src/core/hle/service/caps/caps_ss.cpp index eaa3a7494..24dc716e7 100644 --- a/src/core/hle/service/caps/caps_ss.cpp +++ b/src/core/hle/service/caps/caps_ss.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_ss.h b/src/core/hle/service/caps/caps_ss.h index e258a6925..450686e4f 100644 --- a/src/core/hle/service/caps/caps_ss.h +++ b/src/core/hle/service/caps/caps_ss.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_su.cpp b/src/core/hle/service/caps/caps_su.cpp index e8b0698e8..fffb2ecf9 100644 --- a/src/core/hle/service/caps/caps_su.cpp +++ b/src/core/hle/service/caps/caps_su.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_su.h b/src/core/hle/service/caps/caps_su.h index c494d7c84..62c9603a9 100644 --- a/src/core/hle/service/caps/caps_su.h +++ b/src/core/hle/service/caps/caps_su.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 78bab6ed8..f36d8de2d 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -58,19 +58,25 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c | |||
| 58 | // u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total | 58 | // u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total |
| 59 | // output entries (which is copied to a s32 by official SW). | 59 | // output entries (which is copied to a s32 by official SW). |
| 60 | IPC::RequestParser rp{ctx}; | 60 | IPC::RequestParser rp{ctx}; |
| 61 | [[maybe_unused]] const auto application_album_file_entries = rp.PopRaw<std::array<u8, 0x30>>(); | 61 | const auto pid{rp.Pop<s32>()}; |
| 62 | const auto pid = rp.Pop<s32>(); | 62 | const auto content_type{rp.PopEnum<ContentType>()}; |
| 63 | const auto content_type = rp.PopRaw<ContentType>(); | 63 | const auto start_posix_time{rp.Pop<s64>()}; |
| 64 | [[maybe_unused]] const auto start_datetime = rp.PopRaw<AlbumFileDateTime>(); | 64 | const auto end_posix_time{rp.Pop<s64>()}; |
| 65 | [[maybe_unused]] const auto end_datetime = rp.PopRaw<AlbumFileDateTime>(); | 65 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 66 | const auto applet_resource_user_id = rp.Pop<u64>(); | 66 | |
| 67 | // TODO: Update this when we implement the album. | ||
| 68 | // Currently we do not have a method of accessing album entries, set this to 0 for now. | ||
| 69 | constexpr s32 total_entries{0}; | ||
| 70 | |||
| 67 | LOG_WARNING(Service_Capture, | 71 | LOG_WARNING(Service_Capture, |
| 68 | "(STUBBED) called. pid={}, content_type={}, applet_resource_user_id={}", pid, | 72 | "(STUBBED) called. pid={}, content_type={}, start_posix_time={}, " |
| 69 | content_type, applet_resource_user_id); | 73 | "end_posix_time={}, applet_resource_user_id={}, total_entries={}", |
| 74 | pid, content_type, start_posix_time, end_posix_time, applet_resource_user_id, | ||
| 75 | total_entries); | ||
| 70 | 76 | ||
| 71 | IPC::ResponseBuilder rb{ctx, 3}; | 77 | IPC::ResponseBuilder rb{ctx, 3}; |
| 72 | rb.Push(RESULT_SUCCESS); | 78 | rb.Push(RESULT_SUCCESS); |
| 73 | rb.Push<s32>(0); | 79 | rb.Push(total_entries); |
| 74 | } | 80 | } |
| 75 | 81 | ||
| 76 | } // namespace Service::Capture | 82 | } // namespace Service::Capture |
diff --git a/src/core/hle/service/caps/caps_u.h b/src/core/hle/service/caps/caps_u.h index e6e0716ff..689364de4 100644 --- a/src/core/hle/service/caps/caps_u.h +++ b/src/core/hle/service/caps/caps_u.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | 1 | // Copyright 2020 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||