🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #4887

Re: Event multi

#4887
From: Simon Poole
Date: Sun, 15 Oct 1989 22:37
23 lines
1690 bytes
In article <1329@gmdzi.UUCP> kloppen@gmdzi.UUCP (Jelske Kloppenburg) writes:
>
>With graf_mkstate you can *sample* the state of the mouse buttons. But the
>question is, how to wait with event_multi on either mouse button. I did not
>solve the problem and I'm waiting too for contributions.

[Sigh! This one turns up often enough to be included on a list of
commonly asked questions, did anybody ever do something about this?]

Your best bet is to install your own vdi mouse button handler, save
the "incoming" button mask in a variable and replace the original value
(if I remember correctly it's in d0) with the value for the left button.
After you've done that jump to the original button handler, the whole
thing needs just a couple of assembler instructions, so it's really
trivial. In your event loop just wait for a left button event and then
sample the stored value for the button that was really pressed.


-- 
------------------------------------------------------------------------
						Simon Poole
 poole@verw.switch.ch/poole@chx400.switch.ch/mcvax!cernvax!chx400!poole
------------------------------------------------------------------------
Technical Details
Message-ID: <1989Oct15.223739.9084@chx400.switch.ch>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!cernvax!chx400!poole
References: <1989Oct14.091054.12986@agate.berkeley.edu> <2935@jhunix.HCF.JHU.EDU> <1329@gmdzi.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!cernvax!chx400!poole
From: poole@chx400.switch.ch (Simon Poole)
Newsgroups: comp.sys.atari.st
Subject: Re: Event multi
Keywords: ST
Message-ID: <1989Oct15.223739.9084@chx400.switch.ch>
Date: 15 Oct 89 22:37:39 GMT
References: <1989Oct14.091054.12986@agate.berkeley.edu> <2935@jhunix.HCF.JHU.EDU> <1329@gmdzi.UUCP>
Reply-To: poole@chx400.switch.ch (Simon Poole)
Organization: SWITCH Zuerich, Switzerland
Lines: 23