From c53c4702b652d35659f23f05fb86d6684be01fc9 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 17 Nov 2014 00:34:05 +0000 Subject: [PATCH] + also preserve the CGA background color in the go32v2 IDE git-svn-id: trunk@29086 - --- ide/fpusrscr.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ide/fpusrscr.pas b/ide/fpusrscr.pas index 73433cdc13..1dd6c1aa76 100644 --- a/ide/fpusrscr.pas +++ b/ide/fpusrscr.pas @@ -184,6 +184,7 @@ type GraphModeName : string; GraphXres,GraphYres : longint; GraphBuffer : pointer; + GraphCGABkColor: Integer; ConsoleGraphDriver, ConsoleGraphMode : smallint; {$endif USE_GRAPH_SWITCH} function GetLineStartOfs(Line: integer): word; @@ -530,6 +531,7 @@ begin 2: GraphMode:=CGAC3; 3: GraphMode:=CGAC1; end; + GraphCGABkColor:=Mem[$40:$66] and $0F; end; $6 : begin GraphDriver:=Graph.CGA; @@ -607,6 +609,10 @@ begin Graph.InitGraph(ConsoleGraphDriver,ConsoleGraphMode,''); if graphresult=grOk then begin + if (ConsoleGraphDriver=CGA) and + (ConsoleGraphMode>=CGAC0) and + (ConsoleGraphMode<=CGAC3) then + SetBkColor(GraphCGABkColor); PutImage(0,0,GraphBuffer^,CopyPut); FreeMem(GraphBuffer,GraphImageSize); GraphBuffer:=nil;