浏览代码

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

git-svn-id: trunk@15130 -
Tomas Hajny 15 年之前
父节点
当前提交
393db3d359
共有 2 个文件被更改,包括 7 次插入1 次删除
  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.