summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/acc.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-26 23:11:12 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-26 23:11:12 +0100
commitdac0c33fd219e7f3fadbb85e0fcd2005f8f9c338 (patch)
tree285accc2e3341050c3abb14dcf2aaeff6cb53e04 /src/core/hle/service/acc/acc.cpp
parentMerge pull request #1641 from DarkLordZach/sm-register-unregister (diff)
downloadyuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar.gz
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar.bz2
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar.lz
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar.xz
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.tar.zst
yuzu-dac0c33fd219e7f3fadbb85e0fcd2005f8f9c338.zip
Diffstat (limited to 'src/core/hle/service/acc/acc.cpp')
-rw-r--r--src/core/hle/service/acc/acc.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index c629f9357..9521431bb 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -21,17 +21,6 @@
namespace Service::Account {
-// TODO: RE this structure
-struct UserData {
- INSERT_PADDING_WORDS(1);
- u32 icon_id;
- u8 bg_color_id;
- INSERT_PADDING_BYTES(0x7);
- INSERT_PADDING_BYTES(0x10);
- INSERT_PADDING_BYTES(0x60);
-};
-static_assert(sizeof(UserData) == 0x80, "UserData structure has incorrect size");
-
// Smallest JPEG https://github.com/mathiasbynens/small/blob/master/jpeg.jpg
// used as a backup should the one on disk not exist
constexpr u32 backup_jpeg_size = 107;
@@ -72,9 +61,11 @@ private:
void Get(Kernel::HLERequestContext& ctx) {
LOG_INFO(Service_ACC, "called user_id={}", user_id.Format());
ProfileBase profile_base{};
- std::array<u8, MAX_DATA> data{};
+ ProfileData data{};
if (profile_manager.GetProfileBaseAndData(user_id, profile_base, data)) {
- ctx.WriteBuffer(data);
+ std::array<u8, sizeof(ProfileData)> raw_data;
+ std::memcpy(raw_data.data(), &data, sizeof(ProfileData));
+ ctx.WriteBuffer(raw_data);
IPC::ResponseBuilder rb{ctx, 16};
rb.Push(RESULT_SUCCESS);
rb.PushRaw(profile_base);