Browse Source

Check press_any_key after greeting for timeout/fail.

Steve Thielemann 3 years ago
parent
commit
193071fc67
1 changed files with 4 additions and 2 deletions
  1. 4 2
      main.cpp

+ 4 - 2
main.cpp

@@ -327,7 +327,9 @@ int main(int argc, char *argv[]) {
         }
       }
     }
-    press_a_key();
+
+    if (press_a_key() < 0)
+      return 0;
   }
 
   int mx, my; // Max screen width/height
@@ -409,7 +411,7 @@ int main(int argc, char *argv[]) {
     }
   }
   if (r < 0) {
-    // TIMEOUT:
+    // DOOR_ERROR:
     if (r == TIMEOUT) {
       door.log() << "TIMEOUT" << std::endl;