🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10857

Finding a HIRES Screen

#10857
From: William J. Murphy
Date: Sat, 07 Jan 1989 07:54
47 lines
2095 bytes
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
Technical Details
Message-ID: <1769@pur-phy>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!mailrus!iuvax!pur-ee!pur-phy!murphy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!mailrus!iuvax!pur-ee!pur-phy!murphy
From: murphy@pur-phy (William J. Murphy)
Newsgroups: comp.sys.amiga.tech
Subject: Finding a HIRES Screen
Message-ID: <1769@pur-phy>
Date: 7 Jan 89 07:54:54 GMT
Reply-To: murphy@newton.physics.purdue.edu.UUCP (William J. Murphy)
Distribution: comp.sys.amiga.tech
Organization: Purdue Univ. Physics Dept., W. Lafayette, IN
Lines: 47