Reading the current *REFRESH setting

Discussions related to graphics (2D and 3D), animation and games programming
Post Reply
David Williams
Posts: 19
Joined: Wed 04 Jul 2018, 16:23

Reading the current *REFRESH setting

Post by David Williams » Mon 20 Aug 2018, 21:17

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
Posts: 19
Joined: Wed 04 Jul 2018, 16:23

Re: Reading the current *REFRESH setting

Post by David Williams » Tue 21 Aug 2018, 07:56

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


David.
--

DDRM
Administrator
Posts: 59
Joined: Mon 02 Apr 2018, 18:04

Re: Reading the current *REFRESH setting

Post by DDRM » Tue 21 Aug 2018, 08:47

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
Posts: 19
Joined: Wed 04 Jul 2018, 16:23

Re: Reading the current *REFRESH setting

Post by David Williams » Tue 21 Aug 2018, 16:14

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

Post Reply