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/acr.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/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 3c531604f9..f4608ac336 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -859,15 +859,22 @@ static void input() { return; } - command_type cmd = get_next_cmd(); - - // [dshaligram] If get_next_cmd encountered a Lua macro binding, your turn - // may be ended by the first invoke of the macro. - if (!you.turn_is_over && cmd != CMD_NEXT_CMD) - process_command( cmd ); + { + // Enable the cursor to read input. The cursor stays on while + // the command is being processed, so subsidiary prompts + // shouldn't need to turn it on explicitly. + cursor_control con(true); + command_type cmd = get_next_cmd(); - if ( you.turn_is_over ) { + // [dshaligram] If get_next_cmd encountered a Lua macro + // binding, your turn may be ended by the first invoke of the + // macro. + if (!you.turn_is_over && cmd != CMD_NEXT_CMD) + process_command( cmd ); + } + if (you.turn_is_over) + { if ( apply_berserk_penalty ) do_berserk_no_combat_penalty(); @@ -2821,6 +2828,8 @@ static bool initialise(void) init_char_table(Options.char_set); init_feature_table(); #endif + + set_cursor_enabled(false); viewwindow(1, false); // This just puts the view up for the first turn. activate_notes(true); |