win32u: Don't use floating point types in syscalls.

This commit is contained in:
Alexandre Julliard 2023-05-12 11:38:34 +02:00
parent 19eab9c0e5
commit f83ec675bd
6 changed files with 13 additions and 11 deletions

View file

@ -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 );
}
/***********************************************************************

View file

@ -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;

View file

@ -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

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );