src/event.c
/* This function handles keyboard input events. */
This function handles keyboard input events.
This function handles keyboard input events .
event_result_t event_keyboard(const SDL_Event e) {
	SDL_KeyboardEvent kb = e.key;
	if(kb.type == SDL_KEYUP) {
		switch(kb.keysym.sym) {
		case SDLK_ESCAPE:
			return EV_QUIT;
		}
	}
	return EV_NONE;
}
event_result_t event_keyboard ( const SDL_Event e ) { SDL_KeyboardEvent kb = e . key ; if ( kb . type == SDL_KEYUP ) { switch ( kb . keysym . sym ) { case SDLK_ESCAPE : return EV_QUIT ; } } return EV_NONE ; }
This function handles keyboard input events.
This function handles keyboard input events .
/* Handle key up events. */ /* If escape is pressed, send a quit message to the game loop. */