diff --git a/nx/include/switch/services/caps.h b/nx/include/switch/services/caps.h index 8ce68978..0aa966f1 100644 --- a/nx/include/switch/services/caps.h +++ b/nx/include/switch/services/caps.h @@ -185,7 +185,7 @@ typedef struct { 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 + CapsScreenShotAttribute attr; ///< \ref CapsScreenShotAttribute u8 unk_x50[0x400]; ///< Unused. } CapsLoadAlbumScreenShotImageOutput; diff --git a/nx/include/switch/services/capsa.h b/nx/include/switch/services/capsa.h index bf935fa9..7dce12b8 100644 --- a/nx/include/switch/services/capsa.h +++ b/nx/include/switch/services/capsa.h @@ -149,7 +149,7 @@ Result capsaLoadAlbumScreenShotThumbnailImageEx(u64 *width, u64 *height, const C * @note Only available on [3.0.0+]. * @param[out] width Output image width. Optional, can be NULL. * @param[out] height Output image height. Optional, can be NULL. - * @param[out] attr \ref CapsScreenShotAttributeForApplication + * @param[out] attr \ref CapsScreenShotAttribute * @param[in] file_id \ref CapsAlbumFileId * @param[in] opts \ref CapsScreenShotDecodeOption * @param[out] image RGBA8 image output buffer. @@ -157,7 +157,7 @@ Result capsaLoadAlbumScreenShotThumbnailImageEx(u64 *width, u64 *height, const 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 capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttributeForApplication *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size); +Result capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size); /** * @brief Returns the AlbumUsage for a specified \ref CapsAlbumStorage. @@ -248,7 +248,7 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C * @note Only available on [3.0.0+]. * @param[out] width Output image width. Optional, can be NULL. * @param[out] height Output image height. Optional, can be NULL. - * @param[out] attr \ref CapsScreenShotAttributeForApplication + * @param[out] attr \ref CapsScreenShotAttribute * @param[in] file_id \ref CapsAlbumFileId * @param[in] opts \ref CapsScreenShotDecodeOption * @param[out] image RGBA8 image output buffer. @@ -256,7 +256,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 capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttributeForApplication *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size); +Result capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size); /** * @brief Load the ScreenShotImage for the specified AlbumFile. @@ -389,6 +389,6 @@ Result capsaReadImageDataFromAlbumMovieReadStream(u64 stream, s64 offset, void* * @brief Gets the file attribute of an AlbumMovieStream. * @note Only available on [4.0.0+]. * @param[in] stream Stream handle. - * @param[out] attr \ref CapsScreenShotAttributeForApplication + * @param[out] attr \ref CapsScreenShotAttribute */ -Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttributeForApplication *attr); +Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttribute *attr); diff --git a/nx/source/services/capsa.c b/nx/source/services/capsa.c index 15df652e..bf571a1c 100644 --- a/nx/source/services/capsa.c +++ b/nx/source/services/capsa.c @@ -142,7 +142,7 @@ Result capsaLoadAlbumScreenShotThumbnailImageEx(u64 *width, u64 *height, const C return _capsaLoadAlbumScreenshotEx(width, height, file_id, opts, image, image_size, workbuf, workbuf_size, 13); } -Result _capsaLoadAlbumScreenShotEx0(u64 *width, u64 *height, CapsScreenShotAttributeForApplication *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size, u32 cmd_id) { +Result _capsaLoadAlbumScreenShotEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size, u32 cmd_id) { if (hosversionBefore(3,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); const struct { @@ -150,7 +150,7 @@ Result _capsaLoadAlbumScreenShotEx0(u64 *width, u64 *height, CapsScreenShotAttri CapsScreenShotDecodeOption opts; } in = { *file_id, *opts }; struct { - CapsScreenShotAttributeForApplication attr; + CapsScreenShotAttribute attr; s64 width; s64 height; } out = {0}; @@ -166,7 +166,7 @@ Result _capsaLoadAlbumScreenShotEx0(u64 *width, u64 *height, CapsScreenShotAttri return rc; } -Result capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttributeForApplication *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size) { +Result capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size) { return _capsaLoadAlbumScreenShotEx0(width, height, attr, file_id, opts, image, image_size, workbuf, workbuf_size, 14); } @@ -271,7 +271,7 @@ Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, C return serviceDispatchInOut(&g_capsaSrv, 501, in, *out); } -Result capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttributeForApplication *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size) { +Result capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size) { return _capsaLoadAlbumScreenShotEx0(width, height, attr, file_id, opts, image, image_size, workbuf, workbuf_size, 1001); } @@ -433,7 +433,7 @@ Result capsaReadImageDataFromAlbumMovieReadStream(u64 stream, s64 offset, void* return _capsaReadImageDataFromAlbumMovieReadStream(stream, offset, buffer, size, actual_size); } -Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttributeForApplication *attribute) { +Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttribute *attribute) { if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);