fixed compilation for new fvision

This commit is contained in:
peter 2004-11-04 11:46:54 +00:00
parent 2c58ec4c1a
commit 63db7dd8c2

View File

@ -1043,9 +1043,6 @@ begin
IDEScreenBufferHandle:=NewScreenBufferHandle; IDEScreenBufferHandle:=NewScreenBufferHandle;
DosScreenBufferHandle:=StartScreenBufferHandle; DosScreenBufferHandle:=StartScreenBufferHandle;
Capture; Capture;
{$ifdef fvision}
if TextModeGFV then
{$endif fvision}
IdeScreenMode.row:=0; IdeScreenMode.row:=0;
SwitchBackToIDEScreen; SwitchBackToIDEScreen;
end; end;
@ -1265,44 +1262,29 @@ end;
do hold all the info } do hold all the info }
procedure TWin32Screen.SaveIDEScreen; procedure TWin32Screen.SaveIDEScreen;
begin begin
{$ifdef fvision} IdeScreenMode:=ScreenMode;
if TextModeGFV then GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
{$endif fvision} { set the dummy buffer as active already now PM }
begin SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
IdeScreenMode:=ScreenMode; UpdateFileHandles;
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
{ set the dummy buffer as active already now PM }
SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
UpdateFileHandles;
end;
end; end;
{ dummy for win32 as the Buffer screen { dummy for win32 as the Buffer screen
do hold all the info } do hold all the info }
procedure TWin32Screen.SaveConsoleScreen; procedure TWin32Screen.SaveConsoleScreen;
begin begin
{$ifdef fvision} GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
if TextModeGFV then { set the dummy buffer as active already now PM }
{$endif fvision} SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
begin UpdateFileHandles;
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
{ set the dummy buffer as active already now PM }
SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
UpdateFileHandles;
end;
end; end;
procedure TWin32Screen.SwitchToConsoleScreen; procedure TWin32Screen.SwitchToConsoleScreen;
begin begin
{$ifdef fvision} SetConsoleActiveScreenBuffer(DosScreenBufferHandle);
if TextModeGFV then SetStdHandle(cardinal(Std_Output_Handle),DosScreenBufferHandle);
{$endif fvision} SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), ConsoleMode);
begin UpdateFileHandles;
SetConsoleActiveScreenBuffer(DosScreenBufferHandle);
SetStdHandle(cardinal(Std_Output_Handle),DosScreenBufferHandle);
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), ConsoleMode);
UpdateFileHandles;
end;
IDEActive:=false; IDEActive:=false;
end; end;
@ -1313,46 +1295,41 @@ var
res : boolean; res : boolean;
error : longint; error : longint;
begin begin
SetStdHandle(cardinal(Std_Output_Handle),IDEScreenBufferHandle);
UpdateFileHandles;
GetConsoleScreenBufferInfo(IDEScreenBufferHandle,
@ConsoleScreenBufferInfo);
SetConsoleActiveScreenBuffer(IDEScreenBufferHandle);
{$ifdef fvision} {$ifdef fvision}
if TextModeGFV then { Needed to force InitSystemMsg to use the right console handle }
DoneEvents;
InitEvents;
{$endif fvision} {$endif fvision}
IdeMode:=(IdeMode or ENABLE_MOUSE_INPUT or ENABLE_WINDOW_INPUT) and not ENABLE_PROCESSED_INPUT;
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
WindowPos.left:=0;
WindowPos.right:=ConsoleScreenBufferInfo.srWindow.right
-ConsoleScreenBufferInfo.srWindow.left;
WindowPos.top:=0;
WindowPos.bottom:=ConsoleScreenBufferInfo.srWindow.bottom
-ConsoleScreenBufferInfo.srWindow.top;
with ConsoleScreenBufferInfo.dwMaximumWindowSize do
begin begin
SetStdHandle(cardinal(Std_Output_Handle),IDEScreenBufferHandle); if WindowPos.Right<X-1 then
UpdateFileHandles; WindowPos.right:=X-1;
GetConsoleScreenBufferInfo(IDEScreenBufferHandle, if WindowPos.Bottom<Y-1 then
@ConsoleScreenBufferInfo); WindowPos.Bottom:=Y-1;
SetConsoleActiveScreenBuffer(IDEScreenBufferHandle);
{$ifdef fvision}
{ Needed to force InitSystemMsg to use the right console handle }
DoneEvents;
InitEvents;
{$endif fvision}
IdeMode:=(IdeMode or ENABLE_MOUSE_INPUT or ENABLE_WINDOW_INPUT) and not ENABLE_PROCESSED_INPUT;
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
WindowPos.left:=0;
WindowPos.right:=ConsoleScreenBufferInfo.srWindow.right
-ConsoleScreenBufferInfo.srWindow.left;
WindowPos.top:=0;
WindowPos.bottom:=ConsoleScreenBufferInfo.srWindow.bottom
-ConsoleScreenBufferInfo.srWindow.top;
with ConsoleScreenBufferInfo.dwMaximumWindowSize do
begin
if WindowPos.Right<X-1 then
WindowPos.right:=X-1;
if WindowPos.Bottom<Y-1 then
WindowPos.Bottom:=Y-1;
end;
res:=SetConsoleWindowInfo(IDEScreenBufferHandle,true,WindowPos);
if not res then
error:=GetLastError;
{$ifdef DEBUG}
IdeScreenMode.row:=WindowPos.bottom+1;
IdeScreenMode.col:=WindowPos.right+1;
{$endif DEBUG}
{ needed to force the correct size for videobuf }
if Assigned(Application) and (IdeScreenMode.row<>0)then
Application^.SetScreenVideoMode(IdeScreenMode);
end; end;
res:=SetConsoleWindowInfo(IDEScreenBufferHandle,true,WindowPos);
if not res then
error:=GetLastError;
{$ifdef DEBUG}
IdeScreenMode.row:=WindowPos.bottom+1;
IdeScreenMode.col:=WindowPos.right+1;
{$endif DEBUG}
{ needed to force the correct size for videobuf }
if Assigned(Application) and (IdeScreenMode.row<>0)then
Application^.SetScreenVideoMode(IdeScreenMode);
IDEActive:=true; IDEActive:=true;
end; end;
@ -1537,7 +1514,10 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.35 2004-09-19 14:51:03 armin Revision 1.36 2004-11-04 11:46:54 peter
fixed compilation for new fvision
Revision 1.35 2004/09/19 14:51:03 armin
* added support for target netwlibc * added support for target netwlibc
Revision 1.34 2004/07/09 23:17:26 peter Revision 1.34 2004/07/09 23:17:26 peter