summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/caps/caps_manager.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-10-27 00:27:44 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2023-10-27 06:29:52 +0200
commitf26dddf3b59ace84626dc05e2699514579d4a5bc (patch)
tree6521620938a6f644ae848b4ed632cf3f8c3c192c /src/core/hle/service/caps/caps_manager.cpp
parentMerge pull request #11880 from abouvier/unbundle-stb (diff)
downloadyuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.gz
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.bz2
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.lz
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.xz
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.zst
yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.zip
Diffstat (limited to 'src/core/hle/service/caps/caps_manager.cpp')
-rw-r--r--src/core/hle/service/caps/caps_manager.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/hle/service/caps/caps_manager.cpp b/src/core/hle/service/caps/caps_manager.cpp
index 7d733eb54..96b225d5f 100644
--- a/src/core/hle/service/caps/caps_manager.cpp
+++ b/src/core/hle/service/caps/caps_manager.cpp
@@ -228,12 +228,14 @@ Result AlbumManager::LoadAlbumScreenShotThumbnail(
Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry,
const ScreenShotAttribute& attribute,
- std::span<const u8> image_data, u64 aruid) {
- return SaveScreenShot(out_entry, attribute, {}, image_data, aruid);
+ AlbumReportOption report_option, std::span<const u8> image_data,
+ u64 aruid) {
+ return SaveScreenShot(out_entry, attribute, report_option, {}, image_data, aruid);
}
Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry,
const ScreenShotAttribute& attribute,
+ AlbumReportOption report_option,
const ApplicationData& app_data, std::span<const u8> image_data,
u64 aruid) {
const u64 title_id = system.GetApplicationProcessProgramID();
@@ -407,10 +409,14 @@ Result AlbumManager::LoadImage(std::span<u8> out_image, const std::filesystem::p
return ResultSuccess;
}
-static void PNGToMemory(void* context, void* png, int len) {
+void AlbumManager::FlipVerticallyOnWrite(bool flip) {
+ stbi_flip_vertically_on_write(flip);
+}
+
+static void PNGToMemory(void* context, void* data, int len) {
std::vector<u8>* png_image = static_cast<std::vector<u8>*>(context);
- png_image->reserve(len);
- std::memcpy(png_image->data(), png, len);
+ unsigned char* png = static_cast<unsigned char*>(data);
+ png_image->insert(png_image->end(), png, png + len);
}
Result AlbumManager::SaveImage(ApplicationAlbumEntry& out_entry, std::span<const u8> image,