From a8855a831f9a789f19e2525962d0e5c4a8463a18 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 17 Dec 2006 13:11:17 +0000 Subject: An attempt at a more comprehensive fix for cursor inconsistencies between platforms. We'll probably need to tweak this further. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@659 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/message.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/message.cc') diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index fee17318d6..8a01c43c26 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -26,6 +26,7 @@ #include "externs.h" #include "initfile.h" +#include "libutil.h" #include "macro.h" #include "delay.h" #include "stuff.h" @@ -413,7 +414,8 @@ void mesclr( bool force ) } // turn cursor off -- avoid 'cursor dance' - _setcursortype(_NOCURSOR); + + cursor_control cs(false); #ifdef DOS_TERM window(1, 18, 78, 25); @@ -448,9 +450,6 @@ void mesclr( bool force ) #endif #endif - // turn cursor back on - _setcursortype(_NORMALCURSOR); - Message_Line = 0; } // end mseclr() @@ -553,11 +552,11 @@ void replay_messages(void) win_start_line = 0; } + // Turn off the cursor + cursor_control cursoff(false); + for(;;) { - // turn cursor off - _setcursortype(_NOCURSOR); - clrscr(); gotoxy(1, 1); @@ -612,9 +611,6 @@ void replay_messages(void) cprintf(EOL); cprintf( "<< Lines %d-%d of %d >>", rel_start, rel_end, num_msgs ); - // turn cursor back on - _setcursortype(_NORMALCURSOR); - keyin = get_ch(); if ((full_buffer && NUM_STORED_MESSAGES > num_lines - 2) -- cgit v1.2.3-54-g00ecf