SDL example with events