[futurebasic] Re: SYSTEM(_easyQuestion) stalks again

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1998 : Group Archive : Group : All Groups

From: BMichael <BMichael@...>
Date: Mon, 13 Apr 1998 14:18:24 EDT
>#1, the easy part: make sure user has a color monitor. I check for
>SYSTEM(_crntDepth) < 8, display an alert, and then force-quit. To the best of
>my knowledge, it isn't _possible_ to set a color monitor to a bit depth of
>less than 8 (greyscale counts as 256 colors even though there are only 16
>actual shades) so if they're not display color it's because they can't.
>(Curious aside: by suppressing the force-quit, I can run my programs just
>fine, albeit slowly and with goofy graphics, on my accelerated SE. But 
>this is obviously not an option for public release.)

It is indeed possible to set the monitor on _some_ Macs to 16-color mode, 
or 4-bit.

>#2, the part that can trigger discussion: I've observed that crashes during
>testing happen most often when users with 68K Macs have their monitors set to
>more than 256 colors, hence my original question (which got overlooked in the
>Great Monitor Debate) about SYSTEM(_machType) < ??? or SYSTEM(_cpuType). So I
>want to intercept this at the outset. I realize I could simply check for bit
>depth regardless of machine type, but why should I meddle with PPC's when
>they're not going to have problems anyway?

Someone pointed you to SYSTEM(_maxColors). I see no reason to check 
either _machType or _cpuType if all you're concerned about is running in 
256 color mode. The table of _machType codes is pretty convoluted, and 
changes with every new Mac released - I don't believe it's as easy as 
saying "less than a certain value". _cpuType will lie to you; it'll tell 
you every PPC Mac is a 680LC40, I believe.

Also, there should be no difference between 68K Macs and PowerMacs on bit 
depth, unless it's just that most PowerMacs have more memory and maybe a 
newer version of the OS. The crash you're seeing on 68K Macs with > 256 
colors is _probably_ an indication that they're running out of memory.

>Once I've collected the information, there's a range of possible actions:
>--tell user to reset monitor, and then quit
>--give a warning, let user choose between Quit (default) and "I'll risk it"
>(continue at current setting)
>--inform user that there may be trouble ahead, but continue regardless
>--get permission to reset bit depth (I actually don't know how to do this, 
>and am in any case inclined to make users do it themselves just on principle)
>--(overlapping all the above) let user put this into prefs for future use

I prefer to get permission, giving three choices; "Continue as is", 
"Reset to 256 Color mode (returned to current state on exit)", or "Quit". 
Example code for changing bit depth should be available at just about any 
of the FB-related web sites. If you can't find exactly what you need, 
email me privately and I'll send you the code I use.

Bill