[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

You determine the conditions required for triggering gameport events by
passing an I/O request to the device with gpd_asktrigger set in
io_Command, the length of the gameporttrigger structure set in io_length
and the address of the structure set in io_Data.  The gameport device will
respond with the event trigger conditions currently set.

    struct IOStdReq *GameIO;  /* Must be initialized prior to using */

    struct GamePortTrigger GameTR;

    void get_trigger_conditions(struct GamePortTrigger *GameTR)
    {
    GameIO->io_Command = GPD_ASKTRIGGER;    /* get type of triggers */
    GameIO->io_Data = (APTR)GameTR;         /* place data here */
    GameIO->io_Length= sizeof(GameTR);
    DoIO(GameIO);
    }