From b1e28963912728be997c42f0f4aa597b50378f7e Mon Sep 17 00:00:00 2001 From: HookedBehemoth Date: Fri, 31 Jan 2020 17:29:29 +0100 Subject: [PATCH] fix types --- nx/include/switch/services/caps.h | 7 ++++--- nx/include/switch/services/capsdc.h | 6 +++--- nx/source/services/capsdc.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nx/include/switch/services/caps.h b/nx/include/switch/services/caps.h index 53c755bf..972f6134 100644 --- a/nx/include/switch/services/caps.h +++ b/nx/include/switch/services/caps.h @@ -65,9 +65,10 @@ typedef struct { /// ScreenShotDecodeOption typedef struct { - bool fancy_upsampling; - bool block_smoothing; - u8 unk_x2[0x1e]; ///< Unknown. Ignored by official sw. + u8 fancy_upsampling; ///< See libjpeg-turbo do_fancy_upsampling. + u8 block_smoothing; ///< See libjpec-turbo do_block_smoothing. + u8 pad_x2[0x6]; ///< Padding. + u64 unk_x8[0x3]; ///< Unknown. Ignored by official sw. } CapsScreenShotDecodeOption; /// AlbumFileDateTime. This corresponds to each field in the Album entry filename, prior to the "-": "YYYYMMDDHHMMSSII". diff --git a/nx/include/switch/services/capsdc.h b/nx/include/switch/services/capsdc.h index c89a3aa7..4b6f7d51 100644 --- a/nx/include/switch/services/capsdc.h +++ b/nx/include/switch/services/capsdc.h @@ -26,7 +26,7 @@ Service* capsdcGetServiceSession(void); * @param[in] opts CapsScreenShotDecodeOption decode options. * @param[in] jpeg Jpeg image input buffer. * @param[in] jpeg_size Input image buffer size. - * @param[out] image RGBA8 image output buffer. - * @param[in] image_size Output image buffer size, should be at least large enough for RGBA8 width x height. + * @param[out] out_image RGBA8 image output buffer. + * @param[in] out_image_size Output image buffer size, should be at least large enough for RGBA8 width x height. */ -Result capsdcDecodeJpeg(u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void* jpeg, const u64 jpeg_size, void* image, const u64 image_size); +Result capsdcDecodeJpeg(u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void* jpeg, size_t jpeg_size, void* out_image, size_t out_image_size); diff --git a/nx/source/services/capsdc.c b/nx/source/services/capsdc.c index cc878f4f..2ebdad57 100644 --- a/nx/source/services/capsdc.c +++ b/nx/source/services/capsdc.c @@ -18,7 +18,7 @@ Service* capsdcGetServiceSession(void) { return &g_capsdcSrv; } -Result capsdcDecodeJpeg(u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void* jpeg, const u64 jpeg_size, void* image, const u64 image_size) { +Result capsdcDecodeJpeg(u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void* jpeg, size_t jpeg_size, void* out_image, size_t out_image_size) { const struct { u32 width; u32 height;