Unix ANSI detect fix

This commit is contained in:
mysticbbs 2012-07-06 00:06:50 -04:00
parent 2203895a20
commit 45a051976c
2 changed files with 10 additions and 3 deletions

View File

@ -4258,3 +4258,5 @@
+ Menu access ACS and each menu command ACS has been expanded to 30 + Menu access ACS and each menu command ACS has been expanded to 30
characters. characters.
+ Fixed a bug in the Unix ANSI detection routines which caused an unwanted
extra pause in detection (thanks to Kevin Lamonte)

View File

@ -391,22 +391,27 @@ Begin
End; End;
Session.io.OutFull (Session.GetPrompt(258)); Session.io.OutFull (Session.GetPrompt(258));
Session.io.OutRaw (#27 + '[6n');
Session.io.BufFlush; Session.io.BufFlush;
For Loop := 1 to 12 Do Begin Screen.BufAddStr(#27 + '[6n');
WaitMS(500); Screen.BufFlush;
For Loop := 1 to 24 Do Begin
While Input.KeyPressed Do While Input.KeyPressed Do
If Input.ReadKey in [#27, '[', '0'..'9', ';', 'R'] Then Begin If Input.ReadKey in [#27, '[', '0'..'9', ';', 'R'] Then Begin
Session.io.Graphics := 1; Session.io.Graphics := 1;
Break; Break;
End; End;
If Session.io.Graphics = 1 Then Break;
WaitMS(250);
End; End;
While Input.KeyPressed Do Loop := Byte(Input.ReadKey); While Input.KeyPressed Do Loop := Byte(Input.ReadKey);
Session.io.OutFullLn (Session.GetPrompt(259)); Session.io.OutFullLn (Session.GetPrompt(259));
Session.io.BufFlush;
End; End;
{$ELSE} {$ELSE}
Procedure TBBSUser.DetectGraphics; Procedure TBBSUser.DetectGraphics;