murphy@pur-phy (William J. Murphy) (01/07/89)
After being chided for writing a program that didn't properly open
a custom screen when in morerows mode, I started to hack my code following
the article in Tansactor 1.3 by John Toebes.  He illustrates a method
for looking at Prefernces Pref.LaceWB to set the appropriate numer of 
rows in the display.  I looked through Preferences.h in the include/intuition
diresctory of Manx C, and found no corresponding flag to tell me if the
screen is HIRES.  
I suppose that means that preferences always starts up Workench screen in HIRES?
So, I tried opening the screen according to NormalDisplayRows and Columns 
without any trouble, except that if my custom screen viewmode was NULL, I would
have 640+ columns on a 320+ column screen.  The simple minded solution, but not
foolproof solution was the following:
rows = GfxBase->NormalDisplayRows;
cols = GfxBase->NormalDisplayColumns;
GetPrefs(&prefs, sizeof(struct Preferences));
if (prefs.LaceWB)
{
    newscreen.ViewModes = LACE;
    rows += rows;
}
if (cols > 320)
{
    newscreen.ViewModes = newscreen.ViewModes | HIRES;
}
newscreen.Width  = cols;
newscreen.Height = rows;
The problem I see with this is that MoreRows and other programs can set the
Workbench screen to (LORES + epsilon) or (HIRES + epsilon), but I don't
know whether it is HIRES or LORES. I can see that if the test was 
if (cols >= 640)
    newscreen.ViewModes = newscreen.ViewModes | HIRES;
Then I would always catch the HIRES, unless epsilon were negative.
I hope this explains my question, any sure-fire ways of querying the operating
system to check HIRES?
Bill Murphy
murphy@newton.physics.purdue.edu