Browse Source

+ More error checking

carl 26 years ago
parent
commit
5ba476e64a
1 changed files with 9 additions and 0 deletions
  1. 9 0
      rtl/inc/graph/modes.inc

+ 9 - 0
rtl/inc/graph/modes.inc

@@ -247,6 +247,12 @@
          Hline := modeinfo^.Hline;
          Hline := modeinfo^.Hline;
       if assigned(modeinfo^.Vline) then
       if assigned(modeinfo^.Vline) then
          VLine := modeinfo^.VLine;
          VLine := modeinfo^.VLine;
+      if assigned(modeInfo^.SetVisualPage) then
+         SetVisualPage := modeInfo^.SetVisualPage;
+      if assigned(modeInfo^.SetActivePage) then
+         SetActivePage := modeInfo^.SetActivePage;
+
+
       IntCurrentMode := modeinfo^.ModeNumber;
       IntCurrentMode := modeinfo^.ModeNumber;
       IntCurrentDriver := modeinfo^.DriverNumber;
       IntCurrentDriver := modeinfo^.DriverNumber;
       XAspect := modeinfo^.XAspect;
       XAspect := modeinfo^.XAspect;
@@ -262,10 +268,13 @@
           exit;
           exit;
         end;
         end;
       modeinfo^.InitMode;
       modeinfo^.InitMode;
+      if _GraphResult <> grOk then exit;
       { It is very important that this call be made }
       { It is very important that this call be made }
       { AFTER the other variables have been setup.  }
       { AFTER the other variables have been setup.  }
       { Since it calls some routines which rely on  }
       { Since it calls some routines which rely on  }
       { those variables.                            }
       { those variables.                            }
+      SetActivePage(0);
+      SetVisualPage(0);
       GraphDefaults;
       GraphDefaults;
       SetViewPort(0,0,MaxX,MaxY,TRUE);
       SetViewPort(0,0,MaxX,MaxY,TRUE);
     end;
     end;