Module: wine Branch: master Commit: f83ec675bdf226b221e53ae298eb5f819b512376 URL: https://gitlab.winehq.org/wine/wine/-/commit/f83ec675bdf226b221e53ae298eb5f8...
Author: Alexandre Julliard julliard@winehq.org Date: Fri May 12 11:38:34 2023 +0200
win32u: Don't use floating point types in syscalls.
---
dlls/gdi32/dc.c | 2 +- dlls/win32u/painting.c | 4 +++- dlls/win32u/win32u.spec | 4 ++-- dlls/win32u/win32u_private.h | 4 ++-- dlls/win32u/wrappers.c | 2 +- include/ntgdi.h | 8 ++++---- 6 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index a0308ffa118..91ab6c43bde 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1523,7 +1523,7 @@ BOOL WINAPI AngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FL if (dc_attr->print) print_call_start_page( dc_attr ); if (dc_attr->emf && !EMFDC_AngleArc( dc_attr, x, y, radius, start_angle, sweep_angle )) return FALSE; - return NtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); + return NtGdiAngleArc( hdc, x, y, radius, *(DWORD *)&start_angle, *(DWORD *)&sweep_angle ); }
/*********************************************************************** diff --git a/dlls/win32u/painting.c b/dlls/win32u/painting.c index 8ad9b6267c5..6ec6806896e 100644 --- a/dlls/win32u/painting.c +++ b/dlls/win32u/painting.c @@ -637,8 +637,10 @@ BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT fill_ /*********************************************************************** * NtGdiAngleArc (win32u.@) */ -BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle ) +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD dwRadius, DWORD start_angle, DWORD sweep_angle ) { + FLOAT eStartAngle = *(FLOAT *)&start_angle; + FLOAT eSweepAngle = *(FLOAT *)&sweep_angle; PHYSDEV physdev; BOOL result; DC *dc; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index af3ac7468a9..2831b20ece9 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -113,7 +113,7 @@ @ stub NtGdiAddRemoteFontToDC @ stub NtGdiAddRemoteMMInstanceToDC @ stdcall NtGdiAlphaBlend(long long long long long long long long long long long ptr) -@ stdcall NtGdiAngleArc(long long long long float float) +@ stdcall NtGdiAngleArc(long long long long long long) @ stub NtGdiAnyLinkedFonts @ stdcall NtGdiArcInternal(long long long long long long long long long long) @ stub NtGdiBRUSHOBJ_DeleteRbrush @@ -123,7 +123,7 @@ @ stub NtGdiBRUSHOBJ_ulGetBrushColor @ stub NtGdiBeginGdiRendering @ stdcall NtGdiBeginPath(long) -@ stdcall NtGdiBitBlt(long long long long long long long long long long float) +@ stdcall NtGdiBitBlt(long long long long long long long long long long long) @ stub NtGdiCLIPOBJ_bEnum @ stub NtGdiCLIPOBJ_cEnumStart @ stub NtGdiCLIPOBJ_ppoGetPath diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 32c6c2b905b..fe5143d7903 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -40,8 +40,8 @@ struct unix_funcs BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); - BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, - FLOAT sweep_angle ); + BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, + DWORD sweep_angle ); BOOL (WINAPI *pNtGdiArcInternal)( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ); BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index e128705ef37..4e23f325aec 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -45,7 +45,7 @@ BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, i x_src, y_src, width_src, height_src, blend_function, xform ); }
-BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FLOAT sweep_angle ) +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); diff --git a/include/ntgdi.h b/include/ntgdi.h index 7d00ced2d19..918a5c5d7b3 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -251,8 +251,8 @@ INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); -BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, - FLOAT sweep_angle ); +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, + DWORD sweep_angle ); BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ); BOOL WINAPI NtGdiBeginPath( HDC hdc ); @@ -351,7 +351,7 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRIC DWORD size, void *buffer, const MAT2 *mat2, BOOL ignore_rotation ); DWORD WINAPI NtGdiGetKerningPairs( HDC hdc, DWORD count, KERNINGPAIR *kern_pair ); -BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit ); +BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, DWORD *limit ); COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color ); UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color ); UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData, @@ -435,7 +435,7 @@ BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr ); DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout ); BOOL WINAPI NtGdiSetMagicColors( HDC hdc, DWORD magic, ULONG index ); INT WINAPI NtGdiSetMetaRgn( HDC hdc ); -BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, FLOAT limit, FLOAT *prev_limit ); +BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, DWORD limit, DWORD *prev_limit ); COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color ); BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format ); BOOL WINAPI NtGdiSetRectRgn( HRGN hrgn, INT left, INT top, INT right, INT bottom );