home *** CD-ROM | disk | FTP | other *** search
- Path: easy.in-chemnitz.de!mkmk!floh
- From: floh@mkmk.in-chemnitz.de (Andre Weissflog)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: AddIntServer + VERTB strangeness
- Message-ID: <KeGqy*zJ0@mkmk.in-chemnitz.de>
- Date: Fri, 19 Apr 1996 00:47:42 CET
- Reply-To: floh@mkmk.in-chemnitz.de
- References: <PETERM.96Apr7124019@tui.maths.irl.cri.nz> <1084.6678T720T2089@Redrobe.demon.co.uk>
- <PETERM.96Apr17120442@tui.maths.irl.cri.nz> <4l5gkv$jc0@sunsystem5.informatik.tu-muenchen.de>
- Distribution: world
- Organization: private uucp site
- X-Newsreader: Arn V 1.04
-
- In article <4l5gkv$jc0@sunsystem5.informatik.tu-muenchen.de>, Juergen "Rally" Fischer writes:
-
- >
- > In article <PETERM.96Apr17120442@tui.maths.irl.cri.nz>,
- > peterm@maths.grace.cri.nz (Peter McGavin) writes:
- >
- > |> {
- > |> while (ie != NULL) {
- > |> /* grab raw keyboard/mouse/timer input from ie->ie_Class and
- > |> other input-event fields here */
- > |> ie = ie->ie_NextEvent;
- > |> }
- > |> return NULL;
- > |> }
- > ^--- this is the "let nothign through" part right, i.e. if hi pri
- > all events gone ?
- >
- > what if I still wanna support Amiga-M / Amiga-N in some way ?
- > Or, even better, cancel anything but not all the Amiga-XXX combinations ?
- >
-
- Let only those events travel down the chain, whose
- InputEvent.ie_Qualifier field has the IEQUALIFIERB_LCOMMAND bit
- set. You may unlink events and build from the remaining
- (LAMIGA events) a new input event chain.
-
- > Can someone direct me to the list of numbers given in ie->ie_NextEvent ?
- > mouse ? joystick ?
- >
- ie->ie_NextEvent is the pointer to the next event in the chain,
- or NULL, if there is none. Definitions are in <devices/inputevent.[h|i]>
-
- > The keyevents are RAW, i.e pressed/released ?
- >
- Raw events, bit 7 indicates, whether pressed or released
- (so there are two events for each key stroke).
-
- > My picture of it is this:
- >
- > own hi pri handler filtering all exept Amiga-XXX for hotkeys or screenswitch.
- > Once the own game screen is not at front (Amiga-M), cancel filtering to get
- > Ami controllable.
- >
- This should work just fine.
-
- > Kind of if (intuibase->firstscreen==myscreen) filter();
- >
- > Any ideas/flames ?
- >
- No flames. This is in fact the friendliest method to
- get as many cpu cycles as possible without killing the
- system.
-
- > Will not filtering Amiga-keys result in much overhead ?
-
- Hmm. First, there's nothing to copy around or to
- allocate. I'd say, the LAMIGA filtering alone could
- be done in approx. 10 asm instructions per event,
- or less ;-)
-
- > IMHO the mouse-movement-events cause most calculations
- > (window->mouse x/y etc.).
- >
- Yes. That's why you cancel most input events in your
- high pri input handler. The expensive checking of
- mouse positions against windows and gadgets is done by
- the intuition input handler, which lives at priority 50.
- The commodity handler is at 53 (at least on my machine).
- So you only need to install your handler somewhere at
- priority 60 and Intuition will effectively be disabled.
-
- > What if I need mouseposition on my screen...
- >
- Check for IECLASS_RAWMOUSE events, those give you
- AFAIR only movement information, not position information,
- and manage your own "virtual" mouse position.
-
- Bye,
- -Floh.
-
- ====//=== Andre Weissflog <floh@mkmk.in-chemnitz.de> =======
- ...//..........."Spirits in the material world"............
- \\//......90% of everything is crap (Sturgeon's Law)......
- =\\===============================================Amiga!=
-
-