MCPcopy Create free account
hub / github.com/SFML/SFML / initRawMouse

Function initRawMouse

src/SFML/Window/Win32/WindowImplWin32.cpp:129–135  ·  view source on GitHub ↗

Register a RAWINPUTDEVICE representing the mouse to receive raw mouse deltas using WM_INPUT

Source from the content-addressed store, hash-verified

127// Register a RAWINPUTDEVICE representing the mouse to receive raw
128// mouse deltas using WM_INPUT
129void initRawMouse()
130{
131 const RAWINPUTDEVICE rawMouse{0x01, 0x02, 0, nullptr}; // HID usage: mouse device class, no flags, follow keyboard focus
132
133 if (RegisterRawInputDevices(&rawMouse, 1, sizeof(rawMouse)) != TRUE)
134 sf::err() << "Failed to initialize raw mouse input" << std::endl;
135}
136} // namespace
137
138namespace sf::priv

Callers 1

WindowImplWin32Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected