summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/acc/acc.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index e952b0518..f3c5b1b9c 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -42,7 +42,7 @@ public:
42 {0, &IProfile::Get, "Get"}, 42 {0, &IProfile::Get, "Get"},
43 {1, &IProfile::GetBase, "GetBase"}, 43 {1, &IProfile::GetBase, "GetBase"},
44 {10, nullptr, "GetImageSize"}, 44 {10, nullptr, "GetImageSize"},
45 {11, nullptr, "LoadImage"}, 45 {11, &IProfile::LoadImage, "LoadImage"},
46 }; 46 };
47 RegisterHandlers(functions); 47 RegisterHandlers(functions);
48 } 48 }
@@ -83,6 +83,27 @@ private:
83 rb.PushRaw(profile_base); 83 rb.PushRaw(profile_base);
84 } 84 }
85 85
86 void LoadImage(Kernel::HLERequestContext& ctx) {
87 LOG_WARNING(Service_ACC, "(STUBBED) called");
88 // smallest jpeg https://github.com/mathiasbynens/small/blob/master/jpeg.jpg
89 // TODO(mailwl): load actual profile image from disk, width 256px, max size 0x20000
90 const u32 jpeg_size = 107;
91 static const std::array<u8, jpeg_size> jpeg{
92 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03,
93 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04,
94 0x08, 0x06, 0x06, 0x05, 0x06, 0x09, 0x08, 0x0a, 0x0a, 0x09, 0x08, 0x09, 0x09, 0x0a,
95 0x0c, 0x0f, 0x0c, 0x0a, 0x0b, 0x0e, 0x0b, 0x09, 0x09, 0x0d, 0x11, 0x0d, 0x0e, 0x0f,
96 0x10, 0x10, 0x11, 0x10, 0x0a, 0x0c, 0x12, 0x13, 0x12, 0x10, 0x13, 0x0f, 0x10, 0x10,
97 0x10, 0xff, 0xc9, 0x00, 0x0b, 0x08, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x11, 0x00,
98 0xff, 0xcc, 0x00, 0x06, 0x00, 0x10, 0x10, 0x05, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01,
99 0x00, 0x00, 0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9,
100 };
101 ctx.WriteBuffer(jpeg.data(), jpeg_size);
102 IPC::ResponseBuilder rb{ctx, 3};
103 rb.Push(RESULT_SUCCESS);
104 rb.Push<u32>(jpeg_size);
105 }
106
86 u128 user_id; ///< The user id this profile refers to. 107 u128 user_id; ///< The user id this profile refers to.
87}; 108};
88 109