Aric Stewart : wineps.drv:
Values for DC_MINEXTENT and DC_MAXEXTENT are returned,
not placed in the data pointer.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 15 08:19:16 CDT 2007
Module: wine
Branch: master
Commit: f1172cd4460972cf6cc000b91845e924ecc11c4d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f1172cd4460972cf6cc000b91845e924ecc11c4d
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Mar 14 07:31:20 2007 -0500
wineps.drv: Values for DC_MINEXTENT and DC_MAXEXTENT are returned, not placed in the data pointer.
---
dlls/wineps.drv/driver.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c
index 30bc0b3..9c3136b 100644
--- a/dlls/wineps.drv/driver.c
+++ b/dlls/wineps.drv/driver.c
@@ -603,28 +603,26 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
if(ps->PaperDimension->y > ptMax.y)
ptMax.y = ps->PaperDimension->y;
}
- *((POINT*)lpszOutput) = ptMax;
- return 1;
+ return MAKELONG(ptMax.x * 254.0 / 72.0, ptMax.y * 254.0 / 72.0 );
}
case DC_MINEXTENT:
{
PAGESIZE *ps;
- POINT ptMax;
- ptMax.x = ptMax.y = 0;
+ POINT ptMin;
+ ptMin.x = ptMin.y = -1;
if(lpszOutput == NULL)
return -1;
LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry)
{
- if(ps->PaperDimension->x > ptMax.x)
- ptMax.x = ps->PaperDimension->x;
- if(ps->PaperDimension->y > ptMax.y)
- ptMax.y = ps->PaperDimension->y;
+ if(ptMin.x == -1 || ps->PaperDimension->x < ptMin.x)
+ ptMin.x = ps->PaperDimension->x;
+ if(ptMin.y == -1 || ps->PaperDimension->y < ptMin.y)
+ ptMin.y = ps->PaperDimension->y;
}
- *((POINT*)lpszOutput) = ptMax;
- return 1;
+ return MAKELONG(ptMin.x * 254.0 / 72.0, ptMin.y * 254.0 / 72.0);
}
case DC_SIZE:
More information about the wine-cvs
mailing list