Hi,
I experience some strange phenomenon when trying to create a CxFilter object. Especially when "rawmouse" is used, in which case it sets the error to 'BADFILTER'.
Here is a little proggy I cobbled up to demonstrate the issue:
On the console i get this output:
Anything related to "rawmouse" produces an error.
N.b. '-lauto' switch is used for compilation.
Do I overlook something?
Btw.: I've even taken one of the examples from Amiga wiki, made it compileable, and it produces the same error.
OldFart
#include <proto/exec.h> #include <proto/dos.h> #include <proto/commodities.h> CONST_STRPTR FD[] = {"rawmouse leftbutton" ,"rawmouse rightbutton" ,"rawmouse midbutton" ,"rawmouse relativemouse" ,"shift -alt -control a" ,"rawkey lshift alt f2" ,"rawkey control esc" , NULL }; int main(int argc, char *argv[]) { int RetVal = 9; CxObj *CO; int32 CxErr; uint16 i = 0; while (FD[i] != NULL) { CO = CxFilter(FD[i]); if (CO != NULL) { CxErr = ICommodities->CxObjError(CO); IDOS->Printf("Error : %ld -- %s\n", CxErr, FD[i]); ICommodities->ClearCxObjError(CO); CxErr = 0; ICommodities->DeleteCxObj(CO); } i++; } return RetVal; }
Error : 4 -- rawmouse leftbutton Error : 4 -- rawmouse rightbutton Error : 4 -- rawmouse midbutton Error : 4 -- rawmouse relativemouse Error : 0 -- shift -alt -control a Error : 0 -- rawkey lshift alt f2 Error : 0 -- rawkey control esc