Commit ffbd30dd authored by Pedro Araujo Chaves Jr's avatar Pedro Araujo Chaves Jr Committed by Alexandre Julliard

winspool.drv: Fallback to the first found printer as default printer.

parent fe7e83fd
......@@ -416,7 +416,7 @@ static void *cupshandle;
static BOOL CUPS_LoadPrinters(void)
{
int i, nrofdests;
BOOL hadprinter = FALSE;
BOOL hadprinter = FALSE, haddefault = FALSE;
cups_dest_t *dests;
PRINTER_INFO_2A pinfo2a;
char *port,*devline;
......@@ -494,9 +494,13 @@ static BOOL CUPS_LoadPrinters(void)
HeapFree(GetProcessHeap(),0,port);
hadprinter = TRUE;
if (dests[i].is_default)
if (dests[i].is_default) {
WINSPOOL_SetDefaultPrinter(dests[i].name, dests[i].name, TRUE);
haddefault = TRUE;
}
}
if (hadprinter & !haddefault)
WINSPOOL_SetDefaultPrinter(dests[0].name, dests[0].name, TRUE);
RegCloseKey(hkeyPrinters);
return hadprinter;
}
......
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