WaitLeftMouse takes 4 seconds to react on m68k

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

WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael » Wed Jan 02, 2019 1:20 pm

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: 2714
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair » Wed Jan 02, 2019 6:33 pm

Sounds weird... show some code please...

asrael
Posts: 29
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael » Fri Jan 04, 2019 10:14 am

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: 2714
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair » Fri Jan 04, 2019 9:29 pm

WaitLeftMouse() won't wake up until the left mouse button is up again. Are you releasing it immediately after clicking it?

asrael
Posts: 29
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael » Sat Jan 05, 2019 7:19 pm

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: 2714
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair » Sat Jan 05, 2019 10:22 pm

Weird. What system is this exactly? Which version of AmigaOS? Any patches?

asrael
Posts: 29
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael » Sat Jan 05, 2019 10:51 pm

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: 2714
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair » Sun Jan 06, 2019 3:33 pm

Yes, please test on a non-Vampire system as this looks very strange.

asrael
Posts: 29
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael » Tue Jan 08, 2019 10:49 am

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


Manfred

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

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by airsoftsoftwair » Tue Jan 08, 2019 5:35 pm

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