add CapsLoadAlbumScreenShotImageOutput for caps:a

This commit is contained in:
HookedBehemoth 2020-01-13 13:41:56 +01:00
parent d2552c7451
commit 5bd8862868
3 changed files with 11 additions and 3 deletions

View File

@ -175,6 +175,14 @@ typedef struct {
u8 reserved[0xac]; ///< Unused.
} CapsLoadAlbumScreenShotImageOutputForApplication;
/// LoadAlbumScreenShotImageOutput
typedef struct {
s64 width; ///< Width. Official sw copies this to a s32 output field.
s64 height; ///< Height. Official sw copies this to a s32 output field.
CapsScreenShotAttributeForApplication attr; ///< \ref CapsScreenShotAttributeForApplication
u8 unk_x50[0x400];
} CapsLoadAlbumScreenShotImageOutput;
/// Gets the ShimLibraryVersion.
u64 capsGetShimLibraryVersion(void);

View File

@ -192,7 +192,7 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C
* @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
* @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
*/
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutputForApplication *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
/**
* @brief Unmounts the specified AlbumStorage.

View File

@ -173,7 +173,7 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C
return serviceDispatchInOut(&g_capsaSrv, 501, in, *out);
}
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutputForApplication *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size) {
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size) {
if (hosversionBefore(4,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
struct {
@ -182,7 +182,7 @@ Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id,
} in = { *file_id, *opts };
return serviceDispatchIn(&g_capsaSrv, 1003, in,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_FixedSize, SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_HipcMapTransferAllowsNonSecure, SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { out, sizeof(CapsLoadAlbumScreenShotImageOutputForApplication) }, { image, image_size }, { workbuf, workbuf_size } },
.buffers = { { out, sizeof(CapsLoadAlbumScreenShotImageOutput) }, { image, image_size }, { workbuf, workbuf_size } },
);
}