VWait() does not detect vertical blank when window is minimized
Posted: Fri Nov 22, 2019 3:01 pm
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?
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?