diff options
author | Ameer <aj662@drexel.edu> | 2020-07-04 06:59:40 +0200 |
---|---|---|
committer | Ameer <aj662@drexel.edu> | 2020-07-04 06:59:40 +0200 |
commit | f829932ed191ad469df01342191bf2725e8a20bb (patch) | |
tree | 0ae185ce3ef43ef9b085aae7b9ad5abb04e3d239 /src/core/hle/service/caps/caps.h | |
parent | Fix for always firing triggers on some controllers, trigger threshold more universal (diff) | |
parent | Merge pull request #4218 from ogniK5377/opus-external (diff) | |
download | yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.gz yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.bz2 yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.lz yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.xz yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.zst yuzu-f829932ed191ad469df01342191bf2725e8a20bb.zip |
Diffstat (limited to 'src/core/hle/service/caps/caps.h')
-rw-r--r-- | src/core/hle/service/caps/caps.h | 76 |
1 files changed, 41 insertions, 35 deletions
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 @@ -// Copyright 2018 yuzu emulator team +// Copyright 2018 yuzu Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -12,73 +12,79 @@ class ServiceManager; namespace Service::Capture { -enum AlbumImageOrientation { +enum class AlbumImageOrientation { Orientation0 = 0, Orientation1 = 1, Orientation2 = 2, Orientation3 = 3, }; -enum AlbumReportOption { +enum class AlbumReportOption { Disable = 0, Enable = 1, }; -enum ContentType : u8 { +enum class ContentType : u8 { Screenshot = 0, Movie = 1, ExtraMovie = 3, }; -enum AlbumStorage : u8 { +enum class AlbumStorage : u8 { NAND = 0, SD = 1, }; struct AlbumFileDateTime { - u16 year; - u8 month; - u8 day; - u8 hour; - u8 minute; - u8 second; - u8 uid; + s16 year{}; + s8 month{}; + s8 day{}; + s8 hour{}; + s8 minute{}; + s8 second{}; + s8 uid{}; }; +static_assert(sizeof(AlbumFileDateTime) == 0x8, "AlbumFileDateTime has incorrect size."); struct AlbumEntry { - u64 size; - u64 application_id; - AlbumFileDateTime datetime; - AlbumStorage storage; - ContentType content; - u8 padding[6]; + u64 size{}; + u64 application_id{}; + AlbumFileDateTime datetime{}; + AlbumStorage storage{}; + ContentType content{}; + INSERT_PADDING_BYTES(6); }; +static_assert(sizeof(AlbumEntry) == 0x20, "AlbumEntry has incorrect size."); struct AlbumFileEntry { - u64 size; - u64 hash; - AlbumFileDateTime datetime; - AlbumStorage storage; - ContentType content; - u8 padding[5]; - u8 unknown; + u64 size{}; // Size of the entry + u64 hash{}; // AES256 with hardcoded key over AlbumEntry + AlbumFileDateTime datetime{}; + AlbumStorage storage{}; + ContentType content{}; + INSERT_PADDING_BYTES(5); + u8 unknown{1}; // Set to 1 on official SW }; +static_assert(sizeof(AlbumFileEntry) == 0x20, "AlbumFileEntry has incorrect size."); struct ApplicationAlbumEntry { - u64 size; - u64 hash; - AlbumFileDateTime datetime; - AlbumStorage storage; - ContentType content; - u8 padding[5]; - u8 unknown; + u64 size{}; // Size of the entry + u64 hash{}; // AES256 with hardcoded key over AlbumEntry + AlbumFileDateTime datetime{}; + AlbumStorage storage{}; + ContentType content{}; + INSERT_PADDING_BYTES(5); + u8 unknown{1}; // Set to 1 on official SW }; +static_assert(sizeof(ApplicationAlbumEntry) == 0x20, "ApplicationAlbumEntry has incorrect size."); struct ApplicationAlbumFileEntry { - ApplicationAlbumEntry entry; - AlbumFileDateTime datetime; - u64 unknown; + ApplicationAlbumEntry entry{}; + AlbumFileDateTime datetime{}; + u64 unknown{}; }; +static_assert(sizeof(ApplicationAlbumFileEntry) == 0x30, + "ApplicationAlbumFileEntry has incorrect size."); /// Registers all Capture services with the specified service manager. void InstallInterfaces(SM::ServiceManager& sm); |