Resolve #281. (Might have problems with non-SDL interfaces, but definitely good for what we're shipping with.)