diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-24 21:03:29 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-25 00:22:20 +0200 |
commit | 3ec90dc6ef529590112eabc6df412fe18a085aab (patch) | |
tree | d1e70014dedad725d4328d0ce7ca895fb803f4de /src | |
parent | Merge pull request #1468 from DarkLordZach/profile-manager-ui (diff) | |
download | yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar.gz yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar.bz2 yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar.lz yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar.xz yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.tar.zst yuzu-3ec90dc6ef529590112eabc6df412fe18a085aab.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/acc/acc.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index cf065c2e0..17e3aa0e2 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -104,20 +104,20 @@ private: rb.Push(RESULT_SUCCESS); const FileUtil::IOFile image(GetImagePath(user_id), "rb"); - if (!image.IsOpen()) { LOG_WARNING(Service_ACC, "Failed to load user provided image! Falling back to built-in backup..."); ctx.WriteBuffer(backup_jpeg); rb.Push<u32>(backup_jpeg_size); - } else { - const auto size = std::min<u32>(image.GetSize(), MAX_JPEG_IMAGE_SIZE); - std::vector<u8> buffer(size); - image.ReadBytes(buffer.data(), buffer.size()); - - ctx.WriteBuffer(buffer.data(), buffer.size()); - rb.Push<u32>(buffer.size()); + return; } + + const auto size = std::min<u32>(image.GetSize(), MAX_JPEG_IMAGE_SIZE); + std::vector<u8> buffer(size); + image.ReadBytes(buffer.data(), buffer.size()); + + ctx.WriteBuffer(buffer.data(), buffer.size()); + rb.Push<u32>(buffer.size()); } void GetImageSize(Kernel::HLERequestContext& ctx) { |