summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-02-16 22:54:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-02-16 22:54:07 +0200
commitfb5ae9a7a5a36211af989ec7cac986880d49e538 (patch)
tree4ce0620356fff048c0da1283f0a25ffc1c538013 /src/main.cpp
parent741776313a0be27de722bc9894a9cc987db433b0 (diff)
downloadminetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.tar.gz
minetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.tar.bz2
minetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.zip
Debug stacks will now be printed on Ctrl-C. Also client properly quits on Ctrl-C.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 503439d10..88a258dce 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1874,7 +1874,7 @@ int main(int argc, char *argv[])
/*
Menu-game loop
*/
- while(g_device->run())
+ while(g_device->run() && kill == false)
{
// This is used for catching disconnects
@@ -1886,7 +1886,7 @@ int main(int argc, char *argv[])
Loop quits when menu returns proper parameters.
*/
- for(;;)
+ while(kill == false)
{
// Cursor can be non-visible when coming from the game
device->getCursorControl()->setVisible(true);
@@ -2179,7 +2179,7 @@ int main(int argc, char *argv[])
// NOTE: So we have to use getTime() and call run()s between them
u32 lasttime = device->getTimer()->getTime();
- while(device->run())
+ while(device->run() && kill == false)
{
if(g_disconnect_requested)
{