mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 18:42:15 +02:00
add CapsLoadAlbumScreenShotImageOutput for caps:a
This commit is contained in:
parent
d2552c7451
commit
5bd8862868
@ -175,6 +175,14 @@ typedef struct {
|
|||||||
u8 reserved[0xac]; ///< Unused.
|
u8 reserved[0xac]; ///< Unused.
|
||||||
} CapsLoadAlbumScreenShotImageOutputForApplication;
|
} 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.
|
/// Gets the ShimLibraryVersion.
|
||||||
u64 capsGetShimLibraryVersion(void);
|
u64 capsGetShimLibraryVersion(void);
|
||||||
|
|
||||||
|
@ -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[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.
|
* @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.
|
* @brief Unmounts the specified AlbumStorage.
|
||||||
|
@ -173,7 +173,7 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C
|
|||||||
return serviceDispatchInOut(&g_capsaSrv, 501, in, *out);
|
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))
|
if (hosversionBefore(4,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
struct {
|
struct {
|
||||||
@ -182,7 +182,7 @@ Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id,
|
|||||||
} in = { *file_id, *opts };
|
} in = { *file_id, *opts };
|
||||||
return serviceDispatchIn(&g_capsaSrv, 1003, in,
|
return serviceDispatchIn(&g_capsaSrv, 1003, in,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_FixedSize, SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_HipcMapTransferAllowsNonSecure, SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.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 } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user