Module: wine Branch: master Commit: b4b39bfbd1ac160bc7d7899ae9976bc45902b523 URL: https://gitlab.winehq.org/wine/wine/-/commit/b4b39bfbd1ac160bc7d7899ae9976bc...
Author: Piotr Caban piotr@codeweavers.com Date: Sun Oct 1 13:04:56 2023 +0200
gdi32: Pass default DEVMODE to winspool in CreateDC.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55670
---
dlls/gdi32/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 368a38db788..e1f6703f81e 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -235,6 +235,12 @@ static BOOL print_copy_devmode( struct print *print, const DEVMODEW *devmode ) HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, const DEVMODEW *devmode ) { + PRINTER_DEFAULTSW prn_defaults = + { + .pDatatype = NULL, + .pDevMode = (DEVMODEW *)devmode, + .DesiredAccess = PRINTER_ACCESS_USE + }; UNICODE_STRING device_str, output_str; driver_entry_point entry_point = NULL; const WCHAR *display = NULL, *p; @@ -280,7 +286,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ERR( "no driver found for %s\n", debugstr_w(buf) ); return 0; } - else if (!OpenPrinterW( (WCHAR *)device, &hspool, NULL )) + else if (!OpenPrinterW( (WCHAR *)device, &hspool, &prn_defaults )) { return 0; }