[07/10] gdiplus: Return success from the GdipSaveGraphics and GdipRestoreGraphics stubs.

Hans Leidekker hans at codeweavers.com
Mon Nov 24 03:22:39 CST 2008


diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index aba2aca..7c1ff9b 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -2788,7 +2788,7 @@ GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState stat
     if(!(calls++))
         FIXME("graphics state not implemented\n");
 
-    return NotImplemented;
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics *graphics, REAL angle,
@@ -2815,7 +2815,8 @@ GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state)
     if(!(calls++))
         FIXME("graphics state not implemented\n");
 
-    return NotImplemented;
+    *state = 0xdeadbeef;
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx,
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 9d06fd9..5db3ca9 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -130,12 +130,10 @@ static void test_save_restore(void)
     GdipCreateFromHDC(hdc, &graphics1);
     GdipSetInterpolationMode(graphics1, InterpolationModeBilinear);
     stat = GdipSaveGraphics(graphics1, &state_a);
-    todo_wine
-        expect(Ok, stat);
+    expect(Ok, stat);
     GdipSetInterpolationMode(graphics1, InterpolationModeBicubic);
     stat = GdipRestoreGraphics(graphics1, state_a);
-    todo_wine
-        expect(Ok, stat);
+    expect(Ok, stat);
     GdipGetInterpolationMode(graphics1, &mode);
     todo_wine
         expect(InterpolationModeBilinear, mode);
@@ -151,8 +149,7 @@ static void test_save_restore(void)
     GdipSaveGraphics(graphics1, &state_b);
     GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor);
     stat = GdipRestoreGraphics(graphics1, 0xdeadbeef);
-    todo_wine
-        expect(Ok, stat);
+    expect(Ok, stat);
     GdipRestoreGraphics(graphics1, state_b);
     GdipGetInterpolationMode(graphics1, &mode);
     todo_wine



More information about the wine-patches mailing list