change output parameter for capsaLoadAlbumScreenShotThumbnailImageEx1 to a CapsLoadAlbumScreenShotImageOutputForApplication

This commit is contained in:
HookedBehemoth 2020-01-11 01:24:39 +01:00
parent f06e11d0e6
commit d2552c7451
2 changed files with 5 additions and 6 deletions

View File

@ -186,14 +186,13 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C
* @note Only available on [4.0.0+]. * @note Only available on [4.0.0+].
* @param[in] file_id \ref CapsAlbumFileId * @param[in] file_id \ref CapsAlbumFileId
* @param[in] opts \ref CapsScreenShotDecodeOption * @param[in] opts \ref CapsScreenShotDecodeOption
* @param[out] out \ref CapsLoadAlbumScreenShotImageOutputForApplication
* @param[out] image RGBA8 image output buffer. * @param[out] image RGBA8 image output buffer.
* @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180. * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180.
* @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.
* @param[out] out Data buffer.
* @param[in] out_size Size of the Data buffer.
*/ */
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size, void* out, u64 out_size); Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutputForApplication *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
/** /**
* @brief Unmounts the specified AlbumStorage. * @brief Unmounts the specified AlbumStorage.
@ -283,6 +282,6 @@ Result capsaReadImageDataFromAlbumMovieReadStream(u64 stream, s64 offset, void*
* @brief Gets the file attribute of an AlbumMovieStream. * @brief Gets the file attribute of an AlbumMovieStream.
* @note Only available on [4.0.0+]. * @note Only available on [4.0.0+].
* @param[in] stream Stream handle. * @param[in] stream Stream handle.
* @param[out] attr \ref CapsScreenShotAttributeForApplication. * @param[out] attr \ref CapsScreenShotAttributeForApplication
*/ */
Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttributeForApplication *attr); Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttributeForApplication *attr);

View File

@ -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, void* image, u64 image_size, void* workbuf, u64 workbuf_size, void* out, u64 out_size) { Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutputForApplication *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, out_size }, { image, image_size }, { workbuf, workbuf_size } }, .buffers = { { out, sizeof(CapsLoadAlbumScreenShotImageOutputForApplication) }, { image, image_size }, { workbuf, workbuf_size } },
); );
} }