Switched code to SDL renderer