WaitLeftMouse takes 4 seconds to react on m68k

Discuss any general programming issues here
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

Hi.

I have a small program. In the main loop it waits for 'WaitLeftMouse'.
There is a debug log before and after with timing.
Sometimes, or actually most of the time when I click in the window it takes ~4 seconds until the 'WaitLeftMouse' wakes up.
Any idea what's wrong there?


Manfred
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair »

Sounds weird... show some code please...
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

It's pretty simple.

I've stripped it down to this:

Code: Select all

/*
Some @Xyz setup.
Most notably:
*/
@DISPLAY { Title = "", Width = 400, Height = 460, Color = #BLUE }

Repeat
	DebugPrint(GetDate(#DATELOCAL), "Waiting for left mouse...")
	WaitLeftMouse
	DebugPrint(GetDate(#DATELOCAL), Left mouse pressed.");
Forever
According to the log output 80% of the time from clicking left mouse to the second log output takes ages (subjective feeling).
If I click as soon as possible as the first log output appears, the second comes ~2 seconds later.


Regards,
Manfred
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair »

WaitLeftMouse() won't wake up until the left mouse button is up again. Are you releasing it immediately after clicking it?
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

I'm doing a mouse button click - press, and immediately release.
I've just tested again and the delay varies. But it's 2-4 seconds.
Which feels like an eternity.
On MorphOS there is no such delay.


Manfred
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair »

Weird. What system is this exactly? Which version of AmigaOS? Any patches?
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

This is on two Vampirized systems. A600 and A2000. Pretty much stock otherwise, previously 3.9, now 3.1.4.
I'll give it a try on a few more none Vampire systems.


Manfred
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair »

Yes, please test on a non-Vampire system as this looks very strange.
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

OK, Tested on an A1200 with ACA card.
Seems like the delay is not present there.


Manfred
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair »

Hmm, strange. Unfortunately, I don't have a Vampire here for testing. Maybe report this issue to the Vampire team, I doubt that this is a Hollywood problem.
Post Reply