summaryrefslogtreecommitdiff
path: root/packages/fv
diff options
context:
space:
mode:
authorhajny <hajny@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-04-11 00:29:09 +0000
committerhajny <hajny@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-04-11 00:29:09 +0000
commitde2d562cfe97769b160f74c98b920b82a7e8d917 (patch)
tree261fa206bdb4f705de173019e9c774c54afa7e22 /packages/fv
parent967ac5552edc34443868b2cdb59dc2e998baa94c (diff)
downloadfpc-de2d562cfe97769b160f74c98b920b82a7e8d917.tar.gz
* fix previously broken TProgram based FV programs (assuming that unit Video initializes screen parameters at startup)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15130 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fv')
-rw-r--r--packages/fv/src/app.pas2
-rw-r--r--packages/fv/src/drivers.pas6
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/fv/src/app.pas b/packages/fv/src/app.pas
index 25a68630c6..511ce20a1e 100644
--- a/packages/fv/src/app.pas
+++ b/packages/fv/src/app.pas
@@ -806,7 +806,7 @@ BEGIN
{ the orginal code can't be used here because of the limited
video unit capabilities, the mono modus can't be handled
}
-{ Drivers.InitVideo;}
+ Drivers.DetectVideo;
if (ScreenMode.Col div ScreenMode.Row<2) then
ShadowSize.X := 1
else
diff --git a/packages/fv/src/drivers.pas b/packages/fv/src/drivers.pas
index 6ec43e026d..57a382f128 100644
--- a/packages/fv/src/drivers.pas
+++ b/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;
+{-DetectVideo---------------------------------------------------------
+Detects the current video mode without initializing or otherwise
+changing the current screen.
+---------------------------------------------------------------------}
+procedure DetectVideo;
+
{-InitVideo---------------------------------------------------------
Initializes the video manager, Saves the current screen mode in
StartupMode, and switches to the mode indicated by ScreenMode.