Get rid of a W->A crosscall (ResetDCA->ResetDCW).

This commit is contained in:
Vincent Béron 2004-01-13 01:06:44 +00:00 committed by Alexandre Julliard
parent 8349acab6c
commit 431a96f43a
3 changed files with 19 additions and 8 deletions

View File

@ -384,11 +384,13 @@ BOOL PSDRV_DeleteDC( PSDRV_PDEVICE *physDev )
/**********************************************************************
* ResetDC (WINEPS.@)
*/
HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEA *lpInitData )
HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEW *lpInitData )
{
if(lpInitData) {
HRGN hrgn;
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)lpInitData, physDev->pi);
DEVMODEA *devmodeA = DEVMODEdupWtoA(PSDRV_Heap, lpInitData);
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)devmodeA, physDev->pi);
HeapFree(PSDRV_Heap, 0, devmodeA);
PSDRV_UpdateDevCaps(physDev);
hrgn = CreateRectRgn(0, 0, physDev->horzRes, physDev->vertRes);
SelectVisRgn16(HDC_16(physDev->hdc), HRGN_16(hrgn));

View File

@ -250,7 +250,7 @@ typedef struct tagDC_FUNCS
UINT (*pRealizeDefaultPalette)(PHYSDEV);
UINT (*pRealizePalette)(PHYSDEV,HPALETTE,BOOL);
BOOL (*pRectangle)(PHYSDEV,INT,INT,INT,INT);
HDC (*pResetDC)(PHYSDEV,const DEVMODEA*);
HDC (*pResetDC)(PHYSDEV,const DEVMODEW*);
BOOL (*pRestoreDC)(PHYSDEV,INT);
BOOL (*pRoundRect)(PHYSDEV,INT,INT,INT,INT,INT,INT);
INT (*pSaveDC)(PHYSDEV);

View File

@ -812,9 +812,9 @@ BOOL WINAPI DeleteDC( HDC hdc )
/***********************************************************************
* ResetDCA (GDI32.@)
* ResetDCW (GDI32.@)
*/
HDC WINAPI ResetDCA( HDC hdc, const DEVMODEA *devmode )
HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
{
DC *dc;
HDC ret = hdc;
@ -829,11 +829,20 @@ HDC WINAPI ResetDCA( HDC hdc, const DEVMODEA *devmode )
/***********************************************************************
* ResetDCW (GDI32.@)
* ResetDCA (GDI32.@)
*/
HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
HDC WINAPI ResetDCA( HDC hdc, const DEVMODEA *devmode )
{
return ResetDCA(hdc, (const DEVMODEA*)devmode); /* FIXME */
DEVMODEW *devmodeW;
HDC ret;
if (devmode) devmodeW = GdiConvertToDevmodeW(devmode);
else devmodeW = NULL;
ret = ResetDCW(hdc, devmodeW);
if (devmodeW) HeapFree(GetProcessHeap(), 0, devmodeW);
return ret;
}