From: Matthijs Kooijman Date: Tue, 12 Jun 2007 06:18:48 +0000 (+0200) Subject: * Make the InputTask quit the program on escape. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c061b990133dad2567d2dbb029e4b17c912ad857;hp=a4a0e436bb55c33e9f8a624f90a5512671b14559;p=matthijs%2FABM2.git * Make the InputTask quit the program on escape. --- diff --git a/ABM2/Engine/InputTask.cpp b/ABM2/Engine/InputTask.cpp index 97f04f8..61d5112 100755 --- a/ABM2/Engine/InputTask.cpp +++ b/ABM2/Engine/InputTask.cpp @@ -53,6 +53,9 @@ void CInputTask::Update() buttons=SDL_GetRelativeMouseState(&dX,&dY); memcpy(oldKeys,keys,sizeof(unsigned char)*keyCount); keys=SDL_GetKeyState(&keyCount); + + if (keyDown(SDLK_ESCAPE)) + this->getKernel()->KillAllTasks(); } void CInputTask::Stop()