Simple Directmedia Layer
logic