Cleanup `ui/sdl.rs` code a bit.