Original Post
Is there any way to disable mouse acceleration? I've got my mouse input like perfect, only problem is the mouse acceleration due to my windows mouse settings... Also, I was trying to do function pointers before... And then in my main program I've just got a void function calling for two ints, and in the start of the program, it calls... mouse.process(cam.movelook); and cam.movelook is a function in another structure of mine... it's got the right arguements, but it's just not working. :(
struct MOUSE {
int x,y,lastx,lasty;
bool button[5];
// Here's the declaration things...
void (*p2mouseprocess)(int,int);
void process(void (*func) (int, int));
// end decleration
void buttonHdl(int,int,int,int);
void movementHdl(int,int);
void glutSetup();*/
} mouse;
void MOUSE::buttonHdl(int t_button, int state, int x, int y) {
if (state == 0)
button[t_button] = 1;
if (state == 1)
button[t_button] = 0;
}
void MOUSE::movementHdl(int t_x, int t_y) {
lastx = x;
lasty = y;
x = t_x;
y = t_y;
cam.movelook(x-lastx,y-lasty);
*p2mouseprocess(mouse.x-mouse.lastx,mouse.y-mouse.lasty); // This is giving me trouble, it's got something to do with it being a void funcion i think... I'm not sure
}
//This is giving me trouble too..
void MOUSE::process(void(*func)(int, int)) {
p2mouseprocess=&func
}
void MOUSE::glutSetup(void) {
glutMotionFunc(movementHdl);
glutPassiveMotionFunc(movementHdl);
glutMouseFunc(buttonHdl);
}