Took the gutted version of plogg and put it in sdl.cpp