X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/884dad832682619c18f6c324065edc4948fb7c61..6178debcd342963974dbdce6ac2ddb2fbe89e42a:/src/osx/carbon/dcprint.cpp?ds=sidebyside diff --git a/src/osx/carbon/dcprint.cpp b/src/osx/carbon/dcprint.cpp index 3c400a2aba..51cd175ff1 100644 --- a/src/osx/carbon/dcprint.cpp +++ b/src/osx/carbon/dcprint.cpp @@ -105,6 +105,10 @@ wxMacCarbonPrinterDC::wxMacCarbonPrinterDC( wxPrintData* data ) { #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 m_err = PMPrinterGetPrinterResolution(printer, kPMCurrentValue, &res); + if ( m_err != noErr ) + { + m_err = PMGetResolution((PMPageFormat) (native->GetPageFormat()), &res); + } #endif } } @@ -168,7 +172,10 @@ bool wxMacCarbonPrinterDC::StartDoc( wxPrinterDC* dc , const wxString& message #endif { #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - m_err = PMPrinterGetPrinterResolution(printer, kPMCurrentValue, &res); + if ( PMPrinterGetPrinterResolution(printer, kPMCurrentValue, &res) != noErr ) + { + res.hRes = res.vRes = 300; + } #endif } }