Fixed resource leakage when changing resolution from programs. Fixed SDL_ListModes().