Jacek Caban : gdi32: Use DC_ATTR for GetCurrentPositionEx implementation.
Alexandre Julliard
julliard at winehq.org
Wed Jul 21 16:04:30 CDT 2021
Module: wine
Branch: master
Commit: 531a599405786781fa385a4f56b2a26fec624321
URL: https://source.winehq.org/git/wine.git/?a=commit;h=531a599405786781fa385a4f56b2a26fec624321
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Jul 20 09:18:59 2021 +0200
gdi32: Use DC_ATTR for GetCurrentPositionEx implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/dc.c | 13 -------------
dlls/gdi32/gdidc.c | 11 +++++++++++
dlls/gdi32/tests/metafile.c | 3 +++
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 65401fb8ccf..4441592f59f 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -1833,19 +1833,6 @@ BOOL WINAPI GetBrushOrgEx( HDC hdc, LPPOINT pt )
}
-/***********************************************************************
- * GetCurrentPositionEx (GDI32.@)
- */
-BOOL WINAPI GetCurrentPositionEx( HDC hdc, LPPOINT pt )
-{
- DC * dc = get_dc_ptr( hdc );
- if (!dc) return FALSE;
- *pt = dc->attr->cur_pos;
- release_dc_ptr( dc );
- return TRUE;
-}
-
-
/***********************************************************************
* GetViewportExtEx (GDI32.@)
*/
diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c
index c011d66deb9..54526a0876c 100644
--- a/dlls/gdi32/gdidc.c
+++ b/dlls/gdi32/gdidc.c
@@ -37,6 +37,17 @@ static DC_ATTR *get_dc_attr( HDC hdc )
return dc_attr;
}
+/***********************************************************************
+ * GetCurrentPositionEx (GDI32.@)
+ */
+BOOL WINAPI GetCurrentPositionEx( HDC hdc, POINT *point )
+{
+ DC_ATTR *dc_attr;
+ if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
+ *point = dc_attr->cur_pos;
+ return TRUE;
+}
+
/***********************************************************************
* LineTo (GDI32.@)
*/
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index 8a8ad48a1c6..921ac888247 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -3017,6 +3017,9 @@ static void test_metafile_file(void)
ret = Ellipse(dc, 0, 0, 2, 2);
ok( ret, "Ellipse error %d.\n", GetLastError());
+ ret = GetCurrentPositionEx(dc, &oldpoint);
+ ok(!ret, "GetCurrentPositionEx succeeded\n");
+
size = GetFileSize(file, NULL);
ok(!size, "size = %u\n", size);
More information about the wine-cvs
mailing list