[PATCH 0/1] MR4913: gdi32: Ignore Datatype when StartDoc is called
This change causes StartDoc to ignore the requested DataType and to always use EMF. This fixes a printing issue within Quicken Classic. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4913
From: Brendan McGrath <bmcgrath(a)codeweavers.com> --- dlls/gdi32/dc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 5f79150cb93..87335469b9b 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -2444,8 +2444,8 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) info.cbSize = sizeof(info); } - TRACE("DocName %s, Output %s, Datatype %s, fwType %#lx\n", - debugstr_w(info.lpszDocName), debugstr_w(info.lpszOutput), + TRACE("Size: %d, DocName %s, Output %s, Datatype %s, fwType %#lx\n", + info.cbSize, debugstr_w(info.lpszDocName), debugstr_w(info.lpszOutput), debugstr_w(info.lpszDatatype), info.fwType); if (!(dc_attr = get_dc_attr( hdc ))) return SP_ERROR; @@ -2461,22 +2461,22 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) output = StartDocDlgW( print->printer, &info ); if (output) info.lpszOutput = output; - if (!info.lpszDatatype || !wcsicmp(info.lpszDatatype, L"EMF")) + if (info.lpszDatatype && wcsicmp(info.lpszDatatype, L"EMF")) + FIXME("Ignoring DataType %s and forcing EMF\n", debugstr_w(info.lpszDatatype)); + + spool_info.pDocName = (WCHAR *)info.lpszDocName; + spool_info.pOutputFile = (WCHAR *)info.lpszOutput; + spool_info.pDatatype = (WCHAR *)L"NT EMF 1.003"; + if ((ret = StartDocPrinterW( print->printer, 1, (BYTE *)&spool_info ))) { - spool_info.pDocName = (WCHAR *)info.lpszDocName; - spool_info.pOutputFile = (WCHAR *)info.lpszOutput; - spool_info.pDatatype = (WCHAR *)L"NT EMF 1.003"; - if ((ret = StartDocPrinterW( print->printer, 1, (BYTE *)&spool_info ))) + if (!spool_start_doc( dc_attr, print->printer, &info )) { - if (!spool_start_doc( dc_attr, print->printer, &info )) - { - AbortDoc( hdc ); - ret = 0; - } - HeapFree( GetProcessHeap(), 0, output ); - print->flags |= CALL_START_PAGE; - return ret; + AbortDoc( hdc ); + ret = 0; } + HeapFree( GetProcessHeap(), 0, output ); + print->flags |= CALL_START_PAGE; + return ret; } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4913
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=142266 Your paranoid android. === debian11b (64 bit WoW report) === mf: transform.c:2469: Test failed: aacdec: got 0 output samples user32: input.c:3646: Test failed: error 0 Report validation errors: mf:transform crashed (c0000094)
This merge request was approved by Piotr Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4913
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4913
participants (5)
-
Brendan McGrath -
Brendan McGrath (@redmcg) -
Huw Davies (@huw) -
Marvin -
Piotr Caban (@piotr)