Commit f1172cd4 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

wineps.drv: Values for DC_MINEXTENT and DC_MAXEXTENT are returned, not placed in the data pointer.

parent a44d1e5f
...@@ -603,28 +603,26 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP ...@@ -603,28 +603,26 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
if(ps->PaperDimension->y > ptMax.y) if(ps->PaperDimension->y > ptMax.y)
ptMax.y = ps->PaperDimension->y; ptMax.y = ps->PaperDimension->y;
} }
*((POINT*)lpszOutput) = ptMax; return MAKELONG(ptMax.x * 254.0 / 72.0, ptMax.y * 254.0 / 72.0 );
return 1;
} }
case DC_MINEXTENT: case DC_MINEXTENT:
{ {
PAGESIZE *ps; PAGESIZE *ps;
POINT ptMax; POINT ptMin;
ptMax.x = ptMax.y = 0; ptMin.x = ptMin.y = -1;
if(lpszOutput == NULL) if(lpszOutput == NULL)
return -1; return -1;
LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry) LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry)
{ {
if(ps->PaperDimension->x > ptMax.x) if(ptMin.x == -1 || ps->PaperDimension->x < ptMin.x)
ptMax.x = ps->PaperDimension->x; ptMin.x = ps->PaperDimension->x;
if(ps->PaperDimension->y > ptMax.y) if(ptMin.y == -1 || ps->PaperDimension->y < ptMin.y)
ptMax.y = ps->PaperDimension->y; ptMin.y = ps->PaperDimension->y;
} }
*((POINT*)lpszOutput) = ptMax; return MAKELONG(ptMin.x * 254.0 / 72.0, ptMin.y * 254.0 / 72.0);
return 1;
} }
case DC_SIZE: case DC_SIZE:
......
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