X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fmouse.cpp;h=fce870f23aaf367b54155b55f5b9af82b0b51ac3;hb=f608cc1e681e16e21325df56cb96d3f17a348e21;hp=476275f4a77bc75024d254903abc3cb6ba74140f;hpb=5d688fbf457b1f4d3bebde431a7f58c898be584c;p=libs%2Fgui.git diff --git a/source/input/mouse.cpp b/source/input/mouse.cpp index 476275f..fce870f 100644 --- a/source/input/mouse.cpp +++ b/source/input/mouse.cpp @@ -1,6 +1,8 @@ +#ifdef WIN32 +#include +#endif #include #include -#include #include "mouse.h" namespace Msp { @@ -32,7 +34,7 @@ std::string Mouse::get_button_name(unsigned btn) const case 5: return "Wheel Down"; default: - return format("Button %d", btn); + return Device::get_button_name(btn); } } @@ -45,7 +47,7 @@ std::string Mouse::get_axis_name(unsigned axis) const case 1: return "Y axis"; default: - return format("Axis %d", axis); + return Device::get_axis_name(axis); }; } @@ -68,7 +70,7 @@ void Mouse::input_event(const Graphics::Window::Event &event) break; case WM_MOUSEWHEEL: { - unsigned btn = (HIWORD(wp)&0x8000) ? 5 : 4; + unsigned btn = (HIWORD(event.wparam)&0x8000) ? 5 : 4; set_button_state(btn, true, true); set_button_state(btn, false, true); }