mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
caps:a remove OverlayThumbnailData
This commit is contained in:
parent
15429c71c2
commit
8a8cd49af2
@ -164,12 +164,6 @@ typedef struct {
|
|||||||
CapsAlbumContentsUsage usages[16]; ///< \ref CapsAlbumContentsUsage
|
CapsAlbumContentsUsage usages[16]; ///< \ref CapsAlbumContentsUsage
|
||||||
} CapsAlbumUsage16;
|
} CapsAlbumUsage16;
|
||||||
|
|
||||||
/// OverlayThumbnailData
|
|
||||||
typedef struct {
|
|
||||||
CapsAlbumFileId file_id; ///< \ref CapsAlbumFileId
|
|
||||||
u64 size; ///< Size.
|
|
||||||
} CapsOverlayThumbnailData;
|
|
||||||
|
|
||||||
/// UserIdList
|
/// UserIdList
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AccountUid uids[ACC_USER_LIST_SIZE]; ///< \ref AccountUid
|
AccountUid uids[ACC_USER_LIST_SIZE]; ///< \ref AccountUid
|
||||||
|
@ -223,20 +223,22 @@ Result capsaGetAlbumFileListEx0(CapsAlbumStorage storage, u8 flags, u64 *out, Ca
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the image from the last shown ScreenShot Overlay.
|
* @brief Returns the image from the last shown ScreenShot Overlay.
|
||||||
* @param[out] data \ref CapsOverlayThumbnailData
|
* @param[out] file_id \ref CapsAlbumFileId
|
||||||
|
* @param[out] out_size Size of the thumbnail image. Always 0x5100.
|
||||||
* @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 96×54.
|
* @param[in] image_size Image buffer size, should be at least large enough for RGBA8 96×54.
|
||||||
*/
|
*/
|
||||||
Result capsaGetLastOverlayScreenShotThumbnail(CapsOverlayThumbnailData *data, void* image, u64 image_size);
|
Result capsaGetLastOverlayScreenShotThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the image from the last shown Movie Overlay.
|
* @brief Returns the image from the last shown Movie Overlay.
|
||||||
* @note Only available on [4.0.0+].
|
* @note Only available on [4.0.0+].
|
||||||
* @param[out] data \ref CapsOverlayThumbnailData
|
* @param[out] file_id \ref CapsAlbumFileId
|
||||||
|
* @param[out] out_size Size of the thumbnail image. Always 0x5100.
|
||||||
* @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 96×54.
|
* @param[in] image_size Image buffer size, should be at least large enough for RGBA8 96×54.
|
||||||
*/
|
*/
|
||||||
Result capsaGetLastOverlayMovieThumbnail(CapsOverlayThumbnailData *data, void* image, u64 image_size);
|
Result capsaGetLastOverlayMovieThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the currently set autosaving storage.
|
* @brief Gets the currently set autosaving storage.
|
||||||
|
@ -255,21 +255,30 @@ Result capsaGetAlbumFileListEx0(CapsAlbumStorage storage, u8 flags, u64 *out, Ca
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result _capsaGetLastOverlayThumbnail(CapsOverlayThumbnailData *data, void* image, u64 image_size, u32 cmd_id) {
|
Result _capsaGetLastOverlayThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size, u32 cmd_id) {
|
||||||
return serviceDispatchOut(&g_capsaSrv, cmd_id, *data,
|
struct {
|
||||||
|
CapsAlbumFileId file_id;
|
||||||
|
u64 size;
|
||||||
|
} out;
|
||||||
|
Result rc = serviceDispatchOut(&g_capsaSrv, cmd_id, out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out, },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out, },
|
||||||
.buffers = { { image, image_size }, },
|
.buffers = { { image, image_size }, },
|
||||||
);
|
);
|
||||||
|
if (R_SUCCEEDED(rc)) {
|
||||||
|
if (file_id) *file_id = out.file_id;
|
||||||
|
if (out_size) *out_size = out.size;
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsaGetLastOverlayScreenShotThumbnail(CapsOverlayThumbnailData *data, void* image, u64 image_size) {
|
Result capsaGetLastOverlayScreenShotThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size) {
|
||||||
return _capsaGetLastOverlayThumbnail(data, image, image_size, 301);
|
return _capsaGetLastOverlayThumbnail(file_id, out_size, image, image_size, 301);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsaGetLastOverlayMovieThumbnail(CapsOverlayThumbnailData *data, void* image, u64 image_size) {
|
Result capsaGetLastOverlayMovieThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size) {
|
||||||
if (hosversionBefore(4,0,0))
|
if (hosversionBefore(4,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
return _capsaGetLastOverlayThumbnail(data, image, image_size, 302);
|
return _capsaGetLastOverlayThumbnail(file_id, out_size, image, image_size, 302);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsaGetAutoSavingStorage(CapsAlbumStorage *storage) {
|
Result capsaGetAutoSavingStorage(CapsAlbumStorage *storage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user