Browse Source

* fix previously broken TProgram based FV programs (assuming that unit Video initializes screen parameters at startup)

git-svn-id: trunk@15130 -
Tomas Hajny 15 years ago
parent
commit
393db3d359
2 changed files with 7 additions and 1 deletions
  1. 1 1
      packages/fv/src/app.pas
  2. 6 0
      packages/fv/src/drivers.pas

+ 1 - 1
packages/fv/src/app.pas

@@ -806,7 +806,7 @@ BEGIN
   { the orginal code can't be used here because of the limited
   { the orginal code can't be used here because of the limited
     video unit capabilities, the mono modus can't be handled
     video unit capabilities, the mono modus can't be handled
   }
   }
-{  Drivers.InitVideo;}
+  Drivers.DetectVideo;
   if (ScreenMode.Col div ScreenMode.Row<2) then
   if (ScreenMode.Col div ScreenMode.Row<2) then
     ShadowSize.X := 1
     ShadowSize.X := 1
   else
   else

+ 6 - 0
packages/fv/src/drivers.pas

@@ -483,6 +483,12 @@ be used after a call to this. Read(ln)/write(ln) can be used again.
 
 
 procedure donekeyboard;
 procedure donekeyboard;
 
 
+{-DetectVideo---------------------------------------------------------
+Detects the current video mode without initializing or otherwise
+changing the current screen.
+---------------------------------------------------------------------}
+procedure DetectVideo;
+
 {-InitVideo---------------------------------------------------------
 {-InitVideo---------------------------------------------------------
 Initializes the video manager, Saves the current screen mode in
 Initializes the video manager, Saves the current screen mode in
 StartupMode, and switches to the mode indicated by ScreenMode.
 StartupMode, and switches to the mode indicated by ScreenMode.