home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l043 / 3.ddi / DETECT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-11-02  |  387 b   |  21 lines

  1. uses
  2.   Graph;
  3. var
  4.   GraphDriver, GraphMode : integer;
  5.  
  6. begin
  7.   DetectGraph(GraphDriver, GraphMode);
  8.   if (GraphDriver = EGA) or
  9.      (GraphDriver = EGA64) then
  10.   begin
  11.     GraphDriver := CGA;
  12.     GraphMode := CGAHi;
  13.   end;
  14.   InitGraph(GraphDriver,GraphMode,'');
  15.   if GraphResult <> grOk then
  16.     Halt(1);
  17.   Line(0, 0, GetMaxX, GetMaxY);
  18.   Readln;
  19.   CloseGraph;
  20. end.
  21.