.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "al_set_mouse_wheel_precision" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_set_mouse_wheel_precision - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include void al_set_mouse_wheel_precision(int precision) \f[R] .fi .SH DESCRIPTION .PP Sets the precision of the mouse wheel (the z and w coordinates). This precision manifests itself as a multiplier on the \f[C]dz\f[R] and \f[C]dw\f[R] fields in mouse events. It also affects the \f[C]z\f[R] and \f[C]w\f[R] fields of events and ALLEGRO_MOUSE_STATE(3alleg5), but not in a simple way if you alter the precision often, so it is suggested to reset those axes to 0 when you change precision. Setting this to a high value allows you to detect small changes in those two axes for some high precision mice. A flexible way of using this precision is to set it to a high value (120 is likely sufficient for most, if not all, mice) and use a floating point \f[C]dz\f[R] and \f[C]dw\f[R] like so: .IP .nf \f[C] al_set_mouse_wheel_precision(120); ALLEGRO_EVENT event; al_wait_for_event(event_queue, &event); if (event.type == ALLEGRO_EVENT_MOUSE_AXES) { double dz = (double)event.mouse.dz / al_get_mouse_wheel_precision(); /* Use dz in some way... */ } \f[R] .fi .PP Precision is set to 1 by default. It is impossible to set it to a lower precision than that. .SH SINCE .PP 5.1.10 .SH SEE ALSO .PP al_get_mouse_wheel_precision(3alleg5)