Tuesday, June 3, 2008

Well that didn't take long...

Just restored the command-line override for startup resolution. I can think of at least one place where it's useful - quick testing.

Video startup now works as follows:

  • Check the registry for an explicit mode request, fall back on desktop full screen if nothing specified.
  • Check the command-line for an explicit override. -width on it's own will also set a height at 4:3 aspect, to replicate how the original GLQuake did it.
  • If it's windowed, look for a best match.
  • If it's fullscreen, look for an exact match, fall back on the desktop if none found.
  • Set the mode and write it back to the registry.
It's probably worth mentioning how windowed modes are set. In short, any fullscreen mode is also a valid windowed mode, unless either of the width or height also match the desktop width or height, respectively. I'm not overly happy with this, as there is enormous scope for windowed modes of any aspect ratio, whereas this way locks them to aspects that are also supported by the fullscreen modes. I have a feeling that I'm going to rework this to allow for specific aspect ratios to be chosen, as I sometimes like to test in a widescreen windowed mode when I don't have a widescreen monitor to hand.

0 comments: