From d964aaabf71fc210147f52d88d4bf63820ebe3d5 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 7 Jun 2010 16:20:04 -0500 Subject: [PATCH 3/7] windowscodecs: Implement GetFrame for the TGA decoder. --- dlls/windowscodecs/tgaformat.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c index c00ce71..74fa792 100644 --- a/dlls/windowscodecs/tgaformat.c +++ b/dlls/windowscodecs/tgaformat.c @@ -279,8 +279,17 @@ static HRESULT WINAPI TgaDecoder_GetFrameCount(IWICBitmapDecoder *iface, static HRESULT WINAPI TgaDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { - FIXME("(%p,%p): stub\n", iface, ppIBitmapFrame); - return E_NOTIMPL; + TgaDecoder *This = (TgaDecoder*)iface; + TRACE("(%p,%p)\n", iface, ppIBitmapFrame); + + if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED; + + if (index != 0) return E_INVALIDARG; + + IWICBitmapDecoder_AddRef(iface); + *ppIBitmapFrame = (IWICBitmapFrameDecode*)&This->lpFrameVtbl; + + return S_OK; } static const IWICBitmapDecoderVtbl TgaDecoder_Vtbl = { -- 1.7.0.4