I noticed this in one of my programs, I did use VWait() in the mainloop to avoid high CPU load.
This works well as long as the program is active. But if I minimize the window (on windows x64) it will suddenly use lots of CPU.
Similar on Amiga, if HideDisplay() is used to iconify the program, it will consume cpu when VWait() is used to restrict the main loop.
To test, just use the included Hollywood example, eg. DisplayStyle.hws, in the main loop insert VWait and replace WaitEvent with CheckEvent.
I have resolved this on my program, but I found it worth mentioning here.
Is this a bug?
VWait() does not detect vertical blank when window is minimized
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: VWait() does not detect vertical blank when window is minimized
Yes, it is a bug but it was fixed already a few months ago. Here is the history entry:
Code: Select all
- Fix: Starting from Hollywood 6.0 VWait() only waited if the current display was open; this was not a
good idea because it is often used as a throttle (e.g. by Hollywood Designer) and with that design
the CPU usage dramatically increased as soon as a display was minimized
Re: VWait() does not detect vertical blank when window is minimized
Thanks.
When you say "Fixed", does it mean that it will be available in next Hollywood 9, or is it a patch that can be downloaded now?
When you say "Fixed", does it mean that it will be available in next Hollywood 9, or is it a patch that can be downloaded now?
Re: VWait() does not detect vertical blank when window is minimized
It'll be available in the next Hollywood version/update, be it 8.1 or 9.0 or whatever. I guess it should be highly critical bug if it'd be released by other ways.