glstuff

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 64269dcd8c144e12b594edf41bc724bf3b5c5e9d
parent 50b0912c70948e78923e3cc958f349e38b1dd6ae
Author: Brian Swetland <swetland@frotz.net>
Date:   Wed, 30 Jan 2013 01:14:31 -0800

app: key(code) method for reacting to press rather than hold conditions

Diffstat:
Mapp.h | 1+
Msdlglue.cc | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/app.h b/app.h @@ -40,6 +40,7 @@ public: virtual int init(void) = 0; virtual int render(void) = 0; + virtual void key(int code) {}; private: int _width, _height; diff --git a/sdlglue.cc b/sdlglue.cc @@ -92,6 +92,7 @@ void App::handleEvents(void) { break; case SDL_KEYUP: _keystate[ev.key.keysym.sym] = 0; + key(ev.key.keysym.sym); break; case SDL_QUIT: quit();