[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] How can evnt_multi cause an illegal access?



Miro Kropáček, 12.01.2013 22:06:51:

Hi,

I realize this is a little bit vague but I'm really out of ideas. How can
this:
/
event = evnt_multi( MU_KEYBD | MU_MESAG | MU_BUTTON | MU_TIMER,
2, LEFT_BUTTON, 1, /* bclicks, bmask, bstate -- not used */
0, 0, 0, 0, 0, /* m1flag, m1x, m1y, m1w, m1h -- not used */
0, 0, 0, 0, 0, /* m2flag, m2x, m2y, m2w, m2h -- not used */
g_msgBuffer,
250, /* 250 ms = 0.25 second */
&mx, &my, &mb, /* mouse x, mouse y, mouse button */
&kstate, &key, /* shift state, key pressed */
&mc ); /* how many mouse clicks occured */

cause an illegal memory access (around 0x2000, sometimes 0x2010).

http://toshyp.atari.org/en/008007.html#evnt_multi

int16_t evnt_multi ( int16_t ev_mflags, int16_t ev_mbclicks, int16_t ev_mbmask, int16_t ev_mbstate, int16_t ev_mm1flags, int16_t ev_mm1x, int16_t ev_mm1y, int16_t ev_mm1width, int16_t ev_mm1height, int16_t ev_mm2flags, int16_t ev_mm2x, int16_t ev_mm2y, int16_t ev_mm2width, int16_t ev_mm2height, int16_t *ev_mmgpbuff, int16_t ev_mtlocount, int16_t ev_mthicount, int16_t *ev_mmox, int16_t *ev_mmoy, int16_t *ev_mmbutton, int16_t *ev_mmokstate, int16_t *ev_mkreturn, int16_t *ev_mbreturn );

Guess ev_mthicount is missing. Do you check prototypes, or is it another binding?


--
Helmut Karlowski