From d53ef30ed4742eadd0466eb869f10ee8a273c0a3 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 7 Jul 2000 06:42:48 +0000 Subject: [PATCH] * adapted for new modes (and some safety checks) --- tests/tbs/tbs0037.pp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/tbs/tbs0037.pp b/tests/tbs/tbs0037.pp index 158c033f6d..3a19be7acb 100644 --- a/tests/tbs/tbs0037.pp +++ b/tests/tbs/tbs0037.pp @@ -14,16 +14,32 @@ uses crt; var - gd,gm : integer; + gd,gm,res : integer; {$endif OK} begin {$ifdef OK} gd:=detect; initgraph(gd,gm,''); + res := graphresult; + if res <> grOk then + begin + graphErrorMsg(res); + halt(1); + end; + setviewport(0,0,getmaxx,getmaxy,clipon); line(1,1,100,100); {readkey;} - setgraphmode($107); + setgraphmode(m1024x768); + setviewport(0,0,getmaxx,getmaxy,clipon); + res := graphresult; + if res <> grOk then + begin + closegraph; + graphErrorMsg(res); + { no error, graph mode is simply not supported } + halt(0); + end; line(100,100,1024,800); {readkey;} delay(1000);