mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-26 18:57:12 +01:00
* fixes from Thomas Schatzl.
This commit is contained in:
parent
62d2bd16a4
commit
92fcbbb9fb
@ -39,6 +39,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if not found then
|
if not found then
|
||||||
|
CloseGraph();
|
||||||
begin
|
begin
|
||||||
writeln('640x480x256 is not supported!');
|
writeln('640x480x256 is not supported!');
|
||||||
halt(1)
|
halt(1)
|
||||||
|
|||||||
@ -4,12 +4,28 @@ Program GetModeRange_Example;
|
|||||||
|
|
||||||
uses graph;
|
uses graph;
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
{ Currently, only 4, 8, 15 and 16 bit modes are supported
|
{ Currently, only 4, 8, 15 and 16 bit modes are supported
|
||||||
but this may change in the future }
|
but this may change in the future }
|
||||||
gdnames: array[D4bit..D16bit] of string[6] =
|
gdnames: array[D4bit..D16bit] of string[6] =
|
||||||
('4 bit','6 bit','8 bit','12 bit','15 bit','16 bit');
|
('4 bit','6 bit','8 bit','12 bit','15 bit','16 bit');
|
||||||
|
|
||||||
|
procedure WriteRes(const depth : integer);
|
||||||
|
var
|
||||||
|
tw, th : integer;
|
||||||
|
v, text : String;
|
||||||
|
begin
|
||||||
|
text := 'Current resolution is '; str(getmaxx+1, v);
|
||||||
|
text := text + v + 'x'; str(getmaxy+1, v);
|
||||||
|
text := text + v + 'x' + gdnames[depth];
|
||||||
|
setTextStyle(defaultFont,horizDir,1);
|
||||||
|
TW:=TextWidth(text);
|
||||||
|
TH:=TextHeight(text);
|
||||||
|
outTextXY((getMaxX - TW) div 2,
|
||||||
|
(getMaxY - TH) div 2,text);
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
t: text;
|
t: text;
|
||||||
line : string;
|
line : string;
|
||||||
@ -56,6 +72,7 @@ begin
|
|||||||
closegraph;
|
closegraph;
|
||||||
end;
|
end;
|
||||||
writeln(t);
|
writeln(t);
|
||||||
|
WriteRes(gd);
|
||||||
close(t);
|
close(t);
|
||||||
end;
|
end;
|
||||||
append(t);
|
append(t);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user