summary refs log tree commit diff stats
path: root/mazeoflife.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mazeoflife.cpp')
-rw-r--r--mazeoflife.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/mazeoflife.cpp b/mazeoflife.cpp index 0e3464a..20bee1d 100644 --- a/mazeoflife.cpp +++ b/mazeoflife.cpp
@@ -24,6 +24,7 @@ int main(int argc, char *argv[])
24 } 24 }
25 25
26 SDL_WM_SetCaption("Maze Of Life", NULL); 26 SDL_WM_SetCaption("Maze Of Life", NULL);
27 SDL_EnableKeyRepeat(100, 50);
27 28
28 State* state = new GameState(screen->format); 29 State* state = new GameState(screen->format);
29 30
@@ -37,7 +38,7 @@ int main(int argc, char *argv[])
37 case SDL_ACTIVEEVENT: 38 case SDL_ACTIVEEVENT:
38 if (anEvent.active.state == SDL_APPINPUTFOCUS) 39 if (anEvent.active.state == SDL_APPINPUTFOCUS)
39 { 40 {
40 // gameSleep = !anEvent.active.gain; 41 gameSleep = !anEvent.active.gain;
41 } 42 }
42 43
43 break; 44 break;
@@ -45,6 +46,10 @@ int main(int argc, char *argv[])
45 exit(0); 46 exit(0);
46 47
47 break; 48 break;
49 case SDL_KEYDOWN:
50 state->input(anEvent.key.keysym.sym);
51
52 break;
48 } 53 }
49 } 54 }
50 55