summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/cio.cc2
-rw-r--r--crawl-ref/source/command.cc10
2 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index 23305e556c..91f1ddd295 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -335,7 +335,7 @@ int line_reader::read_line(bool clear_previous)
for ( ; ; )
{
- int ch = c_getch();
+ int ch = getchm(c_getch);
if (keyfn)
{
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 3b4a476490..2103084a76 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -25,6 +25,7 @@
#include "abl-show.h"
#include "chardump.h"
+#include "cio.h"
#include "files.h"
#include "invent.h"
#include "itemname.h"
@@ -49,9 +50,14 @@ static const char *command_string( int i );
void quit_game(void)
{
- if (yesno("Really quit?", false, 'n'))
+ char buf[10];
+ mpr("Are you sure you want to quit (enter \"yes\" to confirm)? ",
+ MSGCH_PROMPT);
+ if (!cancelable_get_line(buf, sizeof buf) && !strcasecmp(buf, "yes"))
ouch(INSTANT_DEATH, 0, KILLED_BY_QUITTING);
-} // end quit_game()
+ else
+ canned_msg(MSG_OK);
+}
static const char *features[] = {
"Stash-tracking",