Simpler event handling in src side.
This commit is contained in:
parent
ac796e911d
commit
9e56720122
|
|
@ -33,9 +33,9 @@ void game_handle_event(void)
|
|||
while(pollevent(&event))
|
||||
{
|
||||
if(event.type == EVENT_KEY_DOWN)
|
||||
game.events.keys[event.key.keysym.scancode] = true;
|
||||
game.events.keys[event.key] = true;
|
||||
else if(event.type == EVENT_KEY_UP)
|
||||
game.events.keys[event.key.keysym.scancode] = false;
|
||||
game.events.keys[event.key] = false;
|
||||
|
||||
if(event.type == EVENT_QUIT)
|
||||
game.is_running = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue