X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fhub.cpp;h=e6969372f9240c728d6b15deeb2f0f591caefe98;hb=1238b80d08c1983dfa8914f78b294cd44b1a275b;hp=51b971748170c60599a09c65afe687c2238e2645;hpb=9164e74de9dc17c74ee9f3cea21c4d247a3835d9;p=libs%2Fgui.git diff --git a/source/input/hub.cpp b/source/input/hub.cpp index 51b9717..e696937 100644 --- a/source/input/hub.cpp +++ b/source/input/hub.cpp @@ -39,17 +39,17 @@ std::string Hub::get_button_name(unsigned btn) const void Hub::button_press(unsigned btn, unsigned index) { - set_button_state(index<<12 | btn&0xFFF, true, true); + set_button_state((index<<12) | (btn&0xFFF), true, true); } void Hub::button_release(unsigned btn, unsigned index) { - set_button_state(index<<12 | btn&0xFFF, false, true); + set_button_state((index<<12) | (btn&0xFFF), false, true); } void Hub::axis_motion(unsigned axis, float value, float, unsigned index) { - set_axis_value(index<<12 | axis&0xFFF, value, true); + set_axis_value((index<<12) | (axis&0xFFF), value, true); } } // namespace Input