diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-17 13:11:17 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-17 13:11:17 +0000 |
commit | a8855a831f9a789f19e2525962d0e5c4a8463a18 (patch) | |
tree | 0a2b9caa6732a4cfa392df0352649a6cfccdff1c /crawl-ref/source/message.cc | |
parent | 39379c48505b14bfbe8ac8292e5938ad33d5989a (diff) | |
download | crawl-ref-a8855a831f9a789f19e2525962d0e5c4a8463a18.tar.gz crawl-ref-a8855a831f9a789f19e2525962d0e5c4a8463a18.zip |
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
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 16 |
1 files changed, 6 insertions, 10 deletions
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) |