Commit 94dc49ed authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

wineps.drv: Assign to structs instead of using memcpy.

parent 8789ed6f
......@@ -279,7 +279,7 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
di = (PSDRV_DLGINFO *)GetWindowLongPtrW(hwnd, DWLP_USER);
switch(nmhdr->code) {
case PSN_APPLY:
memcpy(di->pi->Devmode, di->dlgdm, sizeof(PSDRV_DEVMODEA));
*di->pi->Devmode = *di->dlgdm;
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE;
......@@ -370,7 +370,7 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
pPropertySheet = (void*)GetProcAddress(hinstComctl32, "PropertySheetW");
memset(&psp,0,sizeof(psp));
dlgdm = HeapAlloc( PSDRV_Heap, 0, sizeof(*dlgdm) );
memcpy(dlgdm, pi->Devmode, sizeof(*dlgdm));
*dlgdm = *pi->Devmode;
di = HeapAlloc( PSDRV_Heap, 0, sizeof(*di) );
di->pi = pi;
di->dlgdm = dlgdm;
......
......@@ -107,7 +107,7 @@ INT PSDRV_ExtEscape( PSDRV_PDEVICE *physDev, INT nEscape, INT cbInput, LPCVOID i
ibi->GraphicsRect.left,
ibi->GraphicsRect.right
);
memcpy (obi, ibi, sizeof(*ibi));
*obi = *ibi;
return 1;
}
case NEXTBAND:
......
......@@ -352,7 +352,7 @@ BOOL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWSTR devi
return FALSE;
}
memcpy( physDev->Devmode, pi->Devmode, sizeof(PSDRV_DEVMODEA) );
*physDev->Devmode = *pi->Devmode;
physDev->logPixelsX = physDev->pi->ppd->DefaultResolution;
physDev->logPixelsY = physDev->pi->ppd->DefaultResolution;
......@@ -566,7 +566,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
pi->Devmode = HeapAlloc( PSDRV_Heap, 0, sizeof(DefaultDevmode) );
if (pi->Devmode == NULL)
goto cleanup;
memcpy(pi->Devmode, &DefaultDevmode, sizeof(DefaultDevmode) );
*pi->Devmode = DefaultDevmode;
lstrcpynA((LPSTR)pi->Devmode->dmPublic.dmDeviceName,name,CCHDEVICENAME);
using_default_devmode = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment