Commit 0f53dbf3 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Specify existing extra size of WINEPS Devmode structure.

Make ExtDeviceMode16 in WINEPS return the correct size.
parent 63e8a260
......@@ -285,7 +285,7 @@ hwnd, hDriver, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile,
fwMode);
if(!fwMode)
return sizeof(DEVMODEA); /* Just copy dmPublic bit of PSDRV_DEVMODE */
return pi->Devmode->dmPublic.dmSize + pi->Devmode->dmPublic.dmDriverExtra;
if((fwMode & DM_MODIFY) && lpdmInput) {
TRACE("DM_MODIFY set. devIn->dmFields = %08lx\n", lpdmInput->dmFields);
......@@ -337,7 +337,7 @@ fwMode);
if((fwMode & DM_COPY) || (fwMode & DM_UPDATE)) {
if (lpdmOutput)
memcpy(lpdmOutput, pi->Devmode, sizeof(DEVMODEA));
memcpy(lpdmOutput, pi->Devmode, pi->Devmode->dmPublic.dmSize + pi->Devmode->dmPublic.dmDriverExtra );
else
FIXME("lpdmOutput is NULL what should we do??\n");
}
......
......@@ -46,7 +46,7 @@ static PSDRV_DEVMODEA DefaultDevmode =
/* dmSpecVersion */ 0x30a,
/* dmDriverVersion */ 0x001,
/* dmSize */ sizeof(DEVMODEA),
/* dmDriverExtra */ 0,
/* dmDriverExtra */ sizeof(PSDRV_DEVMODEA)-sizeof(DEVMODEA),
/* dmFields */ DM_ORIENTATION | DM_PAPERSIZE | DM_SCALE |
DM_COPIES | DM_DEFAULTSOURCE | DM_COLOR |
DM_DUPLEX | DM_YRESOLUTION | DM_TTOPTION,
......
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