Reading the current *REFRESH setting

Discussions related to graphics (2D and 3D), animation and games programming
David Williams

Reading the current *REFRESH setting

Post by David Williams »

Can anyone tell me a BB4W/BBCSDL-agnostic way of reading the current *REFRESH setting (i.e. whether it's ON or OFF) ?

Sorry if I'm missing something really obvious (which is likely).

I've checked the docs here:

http://www.bbcbasic.co.uk/bbcwin/manual ... ml#vduvars
http://bb4w.wikispaces.com/Interpreter+ ... +variables

And I scanned through the relevant list of articles at http://www.bbcbasic.co.uk/wiki/doku.php ... nd_20games

The reason I would like to know is that if a program of mine needs to enter a (CPU-friendly) wait loop due to the program window losing focus, it's useful to know the *REFRESH setting prior to entering the wait loop so it can be restored afterwards (the refresh is enabled while waiting for focus to return).


David.
--
David Williams

Re: Reading the current *REFRESH setting

Post by David Williams »

It no longer matters, and besides it hardly warranted a post to this forum.


David.
--
DDRM

Re: Reading the current *REFRESH setting

Post by DDRM »

Hi David,

Glad you have resolved the problem, but as it happens the answer "miraculously appeared to me":it's bit 17 of @flags%:

*refresh off
PRINT ~ @flags%
*refresh on
PRINT ~ @flags%

Best wishes,

D
David Williams

Re: Reading the current *REFRESH setting

Post by David Williams »

Thanks for that, David. Now committed to memory. :)