General Category > LisaList2

How does the Lisa determine the delay until dimming the screen?

(1/2) > >>

andrew:
In the conveniences pane, each option is a range between a number of minutes and twice that number (1-2, 2-4, 5-10, etc). So how does LOS determine the exact delay times within those ranges? I've done a little digging but I can't seem to find an explanation as to how this works, just that there's an "approximate" time. Does anyone here know?

AlexTheCat123:
It looks to me as if it's always the lowest time in the specified range, although I only did some preliminary digging, so maybe there are exceptions to this that I'm missing.

Basically, the Preferences Window writes a number to PRAM from 1-6 representing the fade delay, which then gets converted to the appropriate value in minutes by the FadeConvert function in LIBPM/PMM.TEXT. After calling FadeConvert, PMM.TEXT then multiplies the minute value by 60000 to get the appropriate fade delay in milliseconds, which then gets passed into SetFadeDelay in LIBHW/MACHINE.TEXT, which handles the actual checking for user activity and fading of the screen.

And we can see in FadeConvert that the fade delay is always set to the lowest value in each range; the 1-2 minute range gets 1 minute, the 2-4 minute range gets 2 minutes, the 5-10 minute range gets 5 minutes, and so on. Not sure why they specified a range to begin with, unless they were trying to make the logic for determining when to fade the screen look more sophisticated than it actually was or something.

andrew:
Yeah, exactly; I was poking around those same parts of the source and couldn't find any logic that determined how the value was varied within the range. So at least it's not just me.

I was trying to figure out if there was something notable there worth replicating for LisaGUI, or if I should pick a random value within the ranges, or just add the non-functional doubled value on the checkbox label for the hell of it. I might do a random value just to keep things interesting.

AlexTheCat123:
Nope, definitely not just you! I'd say have LisaGUI pick a random value within the range; that certainly makes things more fun!

patrick:
Is the timeout generated by a hardware timer or does it depend on the interrupt load? A software delay would be longer when the system is busy with background activity.

Navigation

[0] Message Index

[#] Next page

Go to full version