[Janitorial] ResetDCA->ResetDCW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Dimi, do you prefer to keep track of progress on this yourself, or
should I send a patch for the janitorial page too?

Vincent
Index: dlls/wineps/init.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/init.c,v
retrieving revision 1.53
diff -u -r1.53 init.c
--- dlls/wineps/init.c	9 Nov 2003 00:26:50 -0000	1.53
+++ dlls/wineps/init.c	11 Jan 2004 20:32:47 -0000
@@ -384,11 +384,13 @@
 /**********************************************************************
  *	     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));
Index: include/gdi.h
===================================================================
RCS file: /home/wine/wine/include/gdi.h,v
retrieving revision 1.87
diff -u -r1.87 gdi.h
--- include/gdi.h	25 Nov 2003 05:03:09 -0000	1.87
+++ include/gdi.h	11 Jan 2004 20:32:48 -0000
@@ -250,7 +250,7 @@
     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);
Index: objects/dc.c
===================================================================
RCS file: /home/wine/wine/objects/dc.c,v
retrieving revision 1.106
diff -u -r1.106 dc.c
--- objects/dc.c	30 Nov 2003 01:43:00 -0000	1.106
+++ objects/dc.c	11 Jan 2004 20:32:48 -0000
@@ -812,9 +812,9 @@
 
 
 /***********************************************************************
- *           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 @@
 
 
 /***********************************************************************
- *           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, (const DEVMODEW*)devmode);
+
+    if (devmodeW) HeapFree(GetProcessHeap(), 0, devmodeW);
+    return ret;
 }
 
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux