summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/settings/tiles_options.txt2
-rw-r--r--crawl-ref/source/tilesdl.cc9
2 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/settings/tiles_options.txt b/crawl-ref/settings/tiles_options.txt
index ae4bd6a41a..2599f7beec 100644
--- a/crawl-ref/settings/tiles_options.txt
+++ b/crawl-ref/settings/tiles_options.txt
@@ -30,7 +30,7 @@
# tile_excl_centre = darkblue
# tile_window_col = yellow
-# If Crawl's response rate is to slow, try increasing the update rate.
+# If Crawl's response rate is top slow, try increasing the update rate.
# tile_update_rate = 1000
# tile_key_repeat_delay = 200
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 9a6fc6a5dd..0db1d9fdf0 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -7,6 +7,7 @@ REVISION("$Rev$");
#include "items.h"
#include "itemprop.h"
#include "files.h"
+#include "macro.h"
#include "message.h"
#include "mon-util.h"
#include "player.h"
@@ -825,6 +826,14 @@ int TilesFramework::getch_ck()
case SDL_KEYDOWN:
m_key_mod |= _get_modifiers(event.key.keysym);
key = _translate_keysym(event.key.keysym);
+ if (m_key_mod == MOD_ALT
+ && key_to_command(key, KMC_DEFAULT) == CMD_NO_CMD)
+ {
+ // If the Alt key is pressed and the command is invalid,
+ // try clearing the Alt key in case it got stuck in
+ // the stupid Windows/SDL bug with Alt-Tab.
+ m_key_mod &= ~MOD_ALT;
+ }
m_region_tile->place_cursor(CURSOR_MOUSE, Region::NO_CURSOR);
// If you hit a key, disable tooltips until the mouse