* Make the InputTask quit the program on escape.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 12 Jun 2007 06:18:48 +0000 (08:18 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 12 Jun 2007 06:18:48 +0000 (08:18 +0200)
ABM2/Engine/InputTask.cpp

index 97f04f8747690f2f8028c47d01b7152dce16d657..61d51126a07f426a4e5dc6e7f4085ee619d5423d 100755 (executable)
@@ -53,6 +53,9 @@ void CInputTask::Update()
        buttons=SDL_GetRelativeMouseState(&dX,&dY);\r
        memcpy(oldKeys,keys,sizeof(unsigned char)*keyCount);\r
        keys=SDL_GetKeyState(&keyCount);\r
+\r
+       if (keyDown(SDLK_ESCAPE))\r
+               this->getKernel()->KillAllTasks();\r
 }\r
 \r
 void CInputTask::Stop()\r