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/libunix.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/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index ef1312caa3..09c01ce817 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -69,6 +69,8 @@ int Character_Set = CHARACTER_SET; short FG_COL = WHITE; short BG_COL = BLACK; +static bool cursor_is_enabled = true; + static unsigned int convert_to_curses_attr( int chattr ) { switch (chattr & CHATTR_ATTRMASK) @@ -401,10 +403,14 @@ int clrscr() return (retval); } +void set_cursor_enabled(bool enabled) +{ + curs_set(cursor_is_enabled = enabled); +} -void _setcursortype(int curstype) +bool is_cursor_enabled() { - curs_set(curstype); + return (cursor_is_enabled); } inline unsigned get_brand(int col) |