From df93d19d3d1706a7a023eecbf51caea548189ac0 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 24 Nov 2008 10:22:39 +0100 Subject: [PATCH] gdiplus: Return success from the GdipSaveGraphics and GdipRestoreGraphics stubs. --- dlls/gdiplus/graphics.c | 5 +++-- dlls/gdiplus/tests/graphics.c | 9 +++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index aba2aca5b82..7c1ff9bd77b 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 9d06fd9fd77..5db3ca97d32 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