diff options
| author | 2018-08-20 18:57:08 -0400 | |
|---|---|---|
| committer | 2018-08-20 19:48:57 -0400 | |
| commit | eb88fedc5d7943c8335fcf25b388b3fd7b0020c5 (patch) | |
| tree | 153c20dc825b04616d45b966b01f86d337dde66b /src | |
| parent | acc: Correct IProfile's constructor initializer list order (diff) | |
| download | yuzu-eb88fedc5d7943c8335fcf25b388b3fd7b0020c5.tar.gz yuzu-eb88fedc5d7943c8335fcf25b388b3fd7b0020c5.tar.xz yuzu-eb88fedc5d7943c8335fcf25b388b3fd7b0020c5.zip | |
acc: Simplify WriteBuffer call within LoadImage()
We have an overload of WriteBuffer that accepts containers that satisfy
the ContiguousContainer concept, which std::array does, so we only need
to pass in the array itself.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/acc/acc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 2ae6ff62f..274d54653 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -76,8 +76,8 @@ private: | |||
| 76 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 76 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 77 | // smallest jpeg https://github.com/mathiasbynens/small/blob/master/jpeg.jpg | 77 | // smallest jpeg https://github.com/mathiasbynens/small/blob/master/jpeg.jpg |
| 78 | // TODO(mailwl): load actual profile image from disk, width 256px, max size 0x20000 | 78 | // TODO(mailwl): load actual profile image from disk, width 256px, max size 0x20000 |
| 79 | const u32 jpeg_size = 107; | 79 | constexpr u32 jpeg_size = 107; |
| 80 | static const std::array<u8, jpeg_size> jpeg{ | 80 | static constexpr std::array<u8, jpeg_size> jpeg{ |
| 81 | 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, | 81 | 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, |
| 82 | 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, | 82 | 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, |
| 83 | 0x08, 0x06, 0x06, 0x05, 0x06, 0x09, 0x08, 0x0a, 0x0a, 0x09, 0x08, 0x09, 0x09, 0x0a, | 83 | 0x08, 0x06, 0x06, 0x05, 0x06, 0x09, 0x08, 0x0a, 0x0a, 0x09, 0x08, 0x09, 0x09, 0x0a, |
| @@ -87,7 +87,7 @@ private: | |||
| 87 | 0xff, 0xcc, 0x00, 0x06, 0x00, 0x10, 0x10, 0x05, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, | 87 | 0xff, 0xcc, 0x00, 0x06, 0x00, 0x10, 0x10, 0x05, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, |
| 88 | 0x00, 0x00, 0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9, | 88 | 0x00, 0x00, 0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9, |
| 89 | }; | 89 | }; |
| 90 | ctx.WriteBuffer(jpeg.data(), jpeg_size); | 90 | ctx.WriteBuffer(jpeg); |
| 91 | IPC::ResponseBuilder rb{ctx, 3}; | 91 | IPC::ResponseBuilder rb{ctx, 3}; |
| 92 | rb.Push(RESULT_SUCCESS); | 92 | rb.Push(RESULT_SUCCESS); |
| 93 | rb.Push<u32>(jpeg_size); | 93 | rb.Push<u32>(jpeg_size); |