Fix issue #33.

Reset the display width and height when the resolution mode is changed.
Remove some hard-coded values.