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

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

OK, can you elaborate a bit on how the this function works in lower levels?


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 »

It just waits for intui messages, namely IDCMP_MOUSEBUTTONS, first with SELECTDOWN set, then with SELECTUP set.
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

Before I bother the Apollo guys I'll put together a simple POC trying to replicate this using plain C.
Vacation is over, time is more tight again.

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

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

I have build a basic C program (on Vampire machine) that creates a window and waits for IDCMP_MOUSEBUTTONS (SELECTUP/SELECTDOWN) events.
But I couldn't see any delays there.

What else can I do to troubleshoot?


Manfred
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by jPV »

I tried your example on my A1200/060/P96 machine, and didn't notice any delays. The two lines printed instantly when I clicked around.
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

jPV wrote: Sun Jan 20, 2019 1:41 pm I tried your example on my A1200/060/P96 machine, and didn't notice any delays. The two lines printed instantly when I clicked around.
Yeah, exactly. The delay doesn't exist on non vampire machines.
See some posts earlier:
"OK, Tested on an A1200 with ACA card.
Seems like the delay is not present there."

But I would be surprised if this a problem Intuition mouse click Wait.
This is practically used in every GUI application. If this would be a general problem on Vamire it would have surfaced already.


Manfred
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by SamuraiCrow »

Can you try to do a garbage collection before you enter the event loop?
I'm on registered MorphOS using FlowStudio.
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

Which garbage would there be on a program that just has launched?
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 »

Can you try this?

Code: Select all

Repeat
   DebugPrint(IsLeftMouse())
   VWait
Forever
Run the code and click and release the left mouse button a few times. Does it immediately report 1 when you click and 0 when you release it? Or is there a delay until the output shows the correct mouse button state?
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: WaitLeftMouse takes 4 seconds to react on m68k

Post by asrael »

airsoftsoftwair wrote: Wed Jan 23, 2019 5:28 pm Can you try this?

Code: Select all

Repeat
   DebugPrint(IsLeftMouse())
   VWait
Forever
Run the code and click and release the left mouse button a few times. Does it immediately report 1 when you click and 0 when you release it? Or is there a delay until the output shows the correct mouse button state?
There is a delay on either pressing left mouse and also releasing left mouse.
Not always. Maybe 2/4 times. Hard to say when on push and when on release.
The delay is ~2 secs.
Post Reply