Vincent Povirk : windowscodecs: Implement GetFrame for the TGA decoder.

Alexandre Julliard julliard at winehq.org
Thu Oct 21 10:50:44 CDT 2010


Module: wine
Branch: master
Commit: bb6d9eaffbaa5543838e027e45b9212a3b3e497a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bb6d9eaffbaa5543838e027e45b9212a3b3e497a

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Mon Jun  7 16:20:04 2010 -0500

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 65d9d3e..2e15e37 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 = {




More information about the wine-cvs mailing list