Module: wine Branch: master Commit: a3e33d40a846e570f673294fa523b52925e80d8b URL: https://gitlab.winehq.org/wine/wine/-/commit/a3e33d40a846e570f673294fa523b52...
Author: Danyil Blyschak dblyschak@codeweavers.com Date: Mon Jun 3 09:58:17 2024 -0500
wineps.drv: Call ResetDCW() to update Devmode in the Unix interface.
Previously, PSDRV_ResetDC() only updated the devmode contained in the print context, which could cause the devmode in the unix interface to be inconsistent with the print context's devmode. This can cause problems later when PostScript is being outputted, as get_device_caps() in the unix interface would reference this inconsistent devmode. By calling ResetDCW() in PSDRV_ResetDC(), these two devmodes remain in-sync.
---
dlls/wineps.drv/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 10e8e77e52d..ec4dc174cf9 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -467,7 +467,7 @@ BOOL PSDRV_ResetDC( print_ctx *ctx, const DEVMODEW *devmode ) dump_devmode( devmode ); PSDRV_MergeDevmodes( ctx->Devmode, devmode, ctx->pi ); } - return TRUE; + return !!ResetDCW( ctx->hdc, devmode ); }
static PRINTER_ENUM_VALUESW *load_font_sub_table( HANDLE printer, DWORD *num_entries )