24 September 2011, 22:29 | #1 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Reading the mouse...
I have an interesting problem which has been bugging me for a while. I start my demo and as soon as it ends it returns to workbench and *sometimes* restarts.
Originally what I thought was happening was that the mouse click used to exit the demo was being detected by workbench and restarts the demo. Sometimes if the point isn't over anything then nothing happens. Sometimes Devpac does something (like load in raw binary in replacement of my sourcecode!). However, I have since added an extra screen where the key "1" is currently used to exit the demo and the same things are happening. Now what I think is happening is that workbench is detecting the mouse left button, used to activate the demo, after the demo exits. I use the following code to detect for a left button mouse press: Code:
credits: **credits code** exit4: btst #6,$bfe001 bne.s credits ;LMB pressed? unpressed4: btst #6,$BFE001 bls.s unpressed4 ;LMB unpressed? Is this the correct way to detect for a mouse press? If I am right about workbench how do I fix the problem? Regards, Lonewolf10 |
24 September 2011, 23:38 | #2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Personally, when I've done a test for press and release of a mousebutton myself in the past, I've used bne / beq rather than bne / bls but yes - the code you posted waits for a press *and* release of the left mousebutton.
|
24 September 2011, 23:51 | #3 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
Regards, Lonewolf10 |
|
01 October 2011, 20:56 | #4 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Hey Lonewolf10
When I read what Leffmann wrote here: http://eab.abime.net/showpost.php?p=779221&postcount=15 It reminded me of what you described: Quote:
Just a thought anyway... Last edited by pmc; 01 October 2011 at 22:23. Reason: added an n :) |
|
01 October 2011, 22:27 | #5 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Thanks, I'll look into it.
FYI, it's not just my demo that does that. I'm sure I have encountered a few other demo's that suffer the same problem when started from workbench. Of course, demo's are best started from boot-up anyway Regards, Lonewolf10 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mouse mat to lower optical mouse sensitivity? | Bamiga2002 | support.Hardware | 7 | 22 March 2013 07:35 |
Magic mouse/virtual mouse driver issues | mark_k | support.WinUAE | 2 | 04 December 2012 20:43 |
AMIGA MOUSE == Any 9 PIN Serial Mouse ????? | megajetman | support.Hardware | 15 | 26 April 2012 13:51 |
A4000, mouse clicks, no mouse move, no keyboard | OverDose | support.Hardware | 4 | 16 March 2011 13:25 |
Amiga mouse moonlighting as Myarc Mouse | thinlega | Nostalgia & memories | 1 | 11 April 2008 13:53 |
|
|