gdi32: Introduce NtGdiSelectBrush.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-07-02 12:38:47 +02:00 committed by Alexandre Julliard
parent 30550d2e6d
commit 966663a1d2
1 changed files with 15 additions and 8 deletions

View File

@ -417,19 +417,15 @@ BOOL WINAPI FixBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
/***********************************************************************
* BRUSH_SelectObject
* NtGdiSelectBrush (win32u.@)
*/
static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle )
{
BRUSHOBJ *brush;
HGDIOBJ ret = 0;
DC *dc = get_dc_ptr( hdc );
DC *dc;
if (!dc)
{
SetLastError( ERROR_INVALID_HANDLE );
return 0;
}
if (!(dc = get_dc_ptr( hdc ))) return 0;
if ((brush = GDI_GetObjPtr( handle, OBJ_BRUSH )))
{
@ -457,6 +453,17 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
}
/***********************************************************************
* BRUSH_SelectObject
*/
static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
{
HGDIOBJ ret = NtGdiSelectBrush( hdc, handle );
if (!ret) SetLastError( ERROR_INVALID_HANDLE );
return ret;
}
/***********************************************************************
* BRUSH_DeleteObject
*/