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

[MiNT] GEMlib/XaAES : graf_mouse(M_SAVE, M_RESTORE and M_LAST)



Hello,

There's something strange (to me) in the names M_xxx used by graf_mouse().

I've done the following test with NAES 1.2 and XaAES:

graf_mouse(258,NULL) save the current mouse form in an internal AES buffer.
graf_mouse(259,NULL) restore the form saved using graf_mouse(258,NULL)
graf_mouse(260,NULL) set the mouse form back to its previous form.

NAES and XaAES have the same reaction (except graf_mouse(260) for XaAES -- XaAES is bugged for this particular value, but it's another subject).

let's talk about the constant names :

in mt_gem.h, and in aes_defs.h (from XaAES), we have:
M_SAVE = 258 -- it's fine because graf_mouse(258) save the current form
M_RESTORE = 260 -- the value to restore the saved form is 259, it's not 260 ! M_LAST = 259 -- the value to get the last (previous) form is 260, it's not 259 !

i've been told that mt_aes defined the constant correctly (M_RESTORE=259, and M_LAST=260 also defined as M_PREVIOUS).

In XaAES, there is

case M_SAVE: /* save the form */
case M_LAST: /* restore the form */
case M_RESTORE: /* set the last previous form */

Am i misunderstanding the words RESTORE/PREVIOUS ? or is there a pb with theses names ?

What i suggest is quite simple: swap M_LAST and M_RESTORE in gemlib (mt_gem.h) so that graf_mouse(M_RESTORE) shall restore the saved form, and graf_mouse(M_LAST) shall set the previous form.

In the same time, we'll have to change the name in xaaes (xa_graf.c)

your opinion ?

Arnaud.