Ziqing Hui : windowscodecs: Implement DdsFrameDecode_GetSize().
Module: wine Branch: master Commit: 9a6108cf438808e93b1e5a66a56a2c72444fa6c4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9a6108cf438808e93b1e5a66a... Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu May 28 13:09:09 2020 +0800 windowscodecs: Implement DdsFrameDecode_GetSize(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 9 +++++++-- dlls/windowscodecs/tests/ddsformat.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index 333f015820..20017788a0 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -299,9 +299,14 @@ static ULONG WINAPI DdsFrameDecode_Release(IWICBitmapFrameDecode *iface) static HRESULT WINAPI DdsFrameDecode_GetSize(IWICBitmapFrameDecode *iface, UINT *puiWidth, UINT *puiHeight) { - FIXME("(%p,%p,%p): stub.\n", iface, puiWidth, puiHeight); + DdsFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); - return E_NOTIMPL; + *puiWidth = This->width; + *puiHeight = This->height; + + TRACE("(%p) -> (%d,%d)\n", iface, *puiWidth, *puiHeight); + + return S_OK; } static HRESULT WINAPI DdsFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface, diff --git a/dlls/windowscodecs/tests/ddsformat.c b/dlls/windowscodecs/tests/ddsformat.c index e31ca576fc..c7f56307d7 100644 --- a/dlls/windowscodecs/tests/ddsformat.c +++ b/dlls/windowscodecs/tests/ddsformat.c @@ -383,7 +383,7 @@ static void test_dds_decoder_frame_size(IWICBitmapDecoder *decoder, IWICBitmapFr if (hr != S_OK) goto end; hr = IWICBitmapFrameDecode_GetSize(frame_decode, &width, &height); - todo_wine ok (hr == S_OK, "%d: GetSize failed for frame %d, hr=%x\n", i, frame_index, hr); + ok (hr == S_OK, "%d: GetSize failed for frame %d, hr=%x\n", i, frame_index, hr); if (hr != S_OK) goto end; depth = params.Depth;
participants (1)
-
Alexandre Julliard