mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 17:43:43 +02:00
printer4lazarus: carbon - replace OSX 10.5 (driver specific) code with OSX 10.0 compatible code for getting printerinters DPI
git-svn-id: trunk@48507 -
This commit is contained in:
parent
2368d8ad9a
commit
575e6ac4fd
@ -338,14 +338,17 @@ end;
|
|||||||
function TCarbonPrinter.GetOutputResolution: PMResolution;
|
function TCarbonPrinter.GetOutputResolution: PMResolution;
|
||||||
var
|
var
|
||||||
res: OSStatus;
|
res: OSStatus;
|
||||||
|
prn: PMPrinter;
|
||||||
|
cnt: UInt32;
|
||||||
begin
|
begin
|
||||||
// PMPrinterGetOutputResolution is supported on OS X 10.5 and later
|
prn := GetCurrentPrinter;
|
||||||
// TODO: check version instead, because 10.5 may still support PowerPC
|
PMPrinterGetPrinterResolutionCount(prn, cnt);
|
||||||
{$if defined(PowerPC) or defined(__ppc__) or defined(ppc)}
|
if cnt>0 then
|
||||||
res := noErr+1;
|
//todo: get the first one or the highest one?
|
||||||
{$else}
|
res:=PMPrinterGetIndexedPrinterResolution(prn, 1, Result)
|
||||||
res := PMPrinterGetOutputResolution(GetCurrentPrinter, PrintSettings, Result{%H-});
|
else
|
||||||
{$endif}
|
res:=noErr+1;
|
||||||
|
|
||||||
if res<>noErr then
|
if res<>noErr then
|
||||||
begin
|
begin
|
||||||
Result.vRes:=72;
|
Result.vRes:=72;
|
||||||
|
Loading…
Reference in New Issue
Block a user