Possible Bug in video.pp (GetVideoMode(aMode);) delivers zero values. lazarus / 64-FPC development ---------------------------------------------------------------------- jc99 · 2016-03-31 21:35 the video.pp from rtl-console is heavily used in fv and it's descendents. the DetectVideo-Procedure in drivers should detect the current -text- console mode, without changing it. therefore it's declared as Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure DetectVideo;VAR  CurrMode : TVideoMode;begin  { Video.InitVideo; Incompatible with BP    and forces a screen clear which is often a bad thing PM }  GetVideoMode(CurrMode);  ScreenMode:=CurrMode;end;  But since video isn't initialized, it returns zero-values. But on video.initVideo the screen is changed. Is there a way to init video, another (less invasive) way ? ---------------------------------------------------------------------- jc99 · 2016-03-31 22:14 I found a possible workaround: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure DetectVideo;VAR  CurrMode : TVideoMode;  Driver: TVideoDriver;begin  { Video.InitVideo; Incompatible with BP    and forces a screen clear which is often a bad thing PM }  if video.ScreenWidth = 0 then    begin      GetVideoDriver (Driver);      if Assigned(Driver.InitDriver) then        driver.InitDriver;    end;  GetVideoMode(CurrMode);  ScreenMode:=CurrMode;end;  Now it detects the color and width but still there is a minor issue about the height, (I allways get 63 instead of 25/43 or 50 ) [Edit:] Maybe it's a bug in FV and the initialization should be done in the initialization-section of the unit. The best way to solve it, would be that initVideo has a (DoClearScreen=true) parameter. So you have the option whether to clear the screen, or not.