Cleaned up SDL window mode code a bit