VWait() does not detect vertical blank when window is minimized

Discuss any general programming issues here
Post Reply
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

VWait() does not detect vertical blank when window is minimized

Post by amyren »

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?
User avatar
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

Post by airsoftsoftwair »

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 
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: VWait() does not detect vertical blank when window is minimized

Post by amyren »

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?
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: VWait() does not detect vertical blank when window is minimized

Post by jPV »

amyren wrote: Sat Nov 23, 2019 2:58 pm 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?
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.
Post Reply