From 45a051976c5d300351eec20a40c98bc930e6d9bf Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Fri, 6 Jul 2012 00:06:50 -0400 Subject: [PATCH] Unix ANSI detect fix --- mystic/HISTORY.txt | 2 ++ mystic/bbs_user.pas | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mystic/HISTORY.txt b/mystic/HISTORY.txt index 1a94d9e..4a04f74 100644 --- a/mystic/HISTORY.txt +++ b/mystic/HISTORY.txt @@ -4258,3 +4258,5 @@ + Menu access ACS and each menu command ACS has been expanded to 30 characters. + + Fixed a bug in the Unix ANSI detection routines which caused an unwanted + extra pause in detection (thanks to Kevin Lamonte) diff --git a/mystic/bbs_user.pas b/mystic/bbs_user.pas index abcd423..f8d3db7 100644 --- a/mystic/bbs_user.pas +++ b/mystic/bbs_user.pas @@ -391,22 +391,27 @@ Begin End; Session.io.OutFull (Session.GetPrompt(258)); - Session.io.OutRaw (#27 + '[6n'); Session.io.BufFlush; - For Loop := 1 to 12 Do Begin - WaitMS(500); + Screen.BufAddStr(#27 + '[6n'); + Screen.BufFlush; + For Loop := 1 to 24 Do Begin While Input.KeyPressed Do If Input.ReadKey in [#27, '[', '0'..'9', ';', 'R'] Then Begin Session.io.Graphics := 1; Break; End; + + If Session.io.Graphics = 1 Then Break; + + WaitMS(250); End; While Input.KeyPressed Do Loop := Byte(Input.ReadKey); Session.io.OutFullLn (Session.GetPrompt(259)); + Session.io.BufFlush; End; {$ELSE} Procedure TBBSUser.DetectGraphics;