Fix uninitialized scalar variable.

Fixes CID #966223.
Improve the Get(Cur)DispMode and SetDispMode functions.

Fixes CID #966222.