There's plenty of topics out on the forums that I've glanced at about the above function. Here's what I've got happens so far when using the set_mouse_speed function in the following settings (I'd appreciate anyone who could fill in the '?'s):
Windows - Windowed Mode: No affect
Windows - Fullscreen Mode: Works (passing larger values to the function makes mouse move slower)
Linux - Windowed Mode: ??
Linux - Fullscreen Mode: ??
Mac - Windowed Mode: ??
Mac - Fullscreen Mode: ??
I guess I'm just going to forget about set_mouse_speed and write my own function to change how fast the mouse moves. I can't seem to get this to work with the hardware cursor, so I'm just drawing my own mouse sprite, which means it could lag on slower computers. Here's the basic code of what I'm doing to change how fast the mouse is moving, in case I'm doing something evil:
|1||//In a logic function|
|2||int x, y;|
|5||if(x != 0 || y != 0)|
|7|| //gmx, gmy are global float variables storing the position|
|8|| //of the adjusted mouse position|
|9|| //ACC is the adjustment factor|
|10|| gmx += x * ACC;|
|11|| gmy += y * ACC;|
|13|| position_mouse(gmx, gmy);|
|17||//In the final portion of the drawing function|
|18||draw_sprite(buffer, mouse_sprite, gmx, gmy);|
|19||blit(buffer, screen, 0, 0, 0, 0, screen->w, screen->h); |