Browse Source

* FVMaxWidth (merged)

peter 25 years ago
parent
commit
1116ee1a20
1 changed files with 11 additions and 5 deletions
  1. 11 5
      api/win32/video.inc

+ 11 - 5
api/win32/video.inc

@@ -1,15 +1,14 @@
 {
 {
    $Id$
    $Id$
-   System independent low-level video interface for win32
-
    Copyright (c) 1999 by Florian Klaempfl
    Copyright (c) 1999 by Florian Klaempfl
 
 
+   System independent low-level video interface for win32
+
    This library is free software; you can redistribute it and/or
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
    version 2 of the License, or (at your option) any later version.
 
 
-
    This library is distributed in the hope that it will be useful,
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -53,6 +52,11 @@ begin
          ScreenHeight:=Y;
          ScreenHeight:=Y;
     end;
     end;
 
 
+  { TDrawBuffer only has FVMaxWidth elements
+    larger values lead to crashes }
+  if ScreenWidth> FVMaxWidth then
+    ScreenWidth:=FVMaxWidth;
+
   CursorX:=ConsoleInfo.dwCursorPosition.x;
   CursorX:=ConsoleInfo.dwCursorPosition.x;
   CursorY:=ConsoleInfo.dwCursorPosition.y;
   CursorY:=ConsoleInfo.dwCursorPosition.y;
   if not ConsoleCursorInfo.bvisible then
   if not ConsoleCursorInfo.bvisible then
@@ -349,10 +353,12 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2000-10-04 11:53:32  pierre
+  Revision 1.4  2000-10-15 09:21:28  peter
+    * FVMaxWidth (merged)
+
+  Revision 1.3  2000/10/04 11:53:32  pierre
    Add TargetEntry and TargetExit (merged)
    Add TargetEntry and TargetExit (merged)
 
 
   Revision 1.2  2000/07/13 11:32:27  michael
   Revision 1.2  2000/07/13 11:32:27  michael
   + removed logs
   + removed logs
-
 }
 }