summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorEnne Walker <ennewalker@users.sourceforge.net>2010-04-23 16:21:46 -0400
committerEnne Walker <ennewalker@users.sourceforge.net>2010-04-24 11:41:02 -0400
commitdb855be41816b3319d1eb268159cc3d568b37e52 (patch)
tree3a2b0cad88b9c861fbd6b2251aa5503fe3fb5343 /crawl-ref/source/libgui.cc
parent628a7cdd6f98325059fe118837b72eddfacd5f86 (diff)
downloadcrawl-ref-db855be41816b3319d1eb268159cc3d568b37e52.tar.gz
crawl-ref-db855be41816b3319d1eb268159cc3d568b37e52.zip
Don't allow event_count to return a negative.
If SDL considers -1 to be an error, just handle that internally and don't pollute the API with that.
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index f13ddc3b15..f8216e69ae 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -342,9 +342,7 @@ int kbhit()
{
// Look for the presence of any keyboard events in the queue.
int count = wm->get_event_count(WM_KEYDOWN);
-
- ASSERT(count != -1);
- return (count == 1 ? 1 : 0);
+ return (count > 0);
}
#ifdef UNIX