Commit 43cffa08 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wineps: Set the printer's devmode using SetPrinter.

parent a7f42d32
......@@ -113,7 +113,6 @@ static const LOGFONTA DefaultLogFont = {
DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, ""
};
static const CHAR default_devmodeA[] = "Default DevMode";
static const struct gdi_dc_funcs psdrv_funcs;
/*********************************************************************
......@@ -610,6 +609,14 @@ static PSDRV_DEVMODEA *get_devmode( HANDLE printer, const char *nameA, BOOL *is_
return dm;
}
static BOOL set_devmode( HANDLE printer, PSDRV_DEVMODEA *dm )
{
PRINTER_INFO_9A info;
info.pDevMode = &dm->dmPublic;
return SetPrinterA( printer, 9, (BYTE *)&info, 0 );
}
static struct list printer_list = LIST_INIT( printer_list );
/**********************************************************************
......@@ -761,8 +768,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
PSDRV_MergeDevmodes(pi->Devmode, &dm, pi);
}
SetPrinterDataExA(hPrinter, NULL, default_devmodeA, REG_BINARY,
(LPBYTE)pi->Devmode, sizeof(DefaultDevmode));
set_devmode( hPrinter, pi->Devmode );
}
if(pi->ppd->DefaultPageSize) { /* We'll let the ppd override the devmode */
......
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