mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
input: add horizontal mouse scroll/tilt to mouse handlers
This commit is contained in:
parent
bf85902485
commit
1600ca2c03
4 changed files with 29 additions and 19 deletions
|
|
@ -143,17 +143,15 @@ void raw_mouse::update_values(const RAWMOUSE& state)
|
|||
get_button_pressed(CELL_MOUSE_BUTTON_4, state.usButtonFlags);
|
||||
get_button_pressed(CELL_MOUSE_BUTTON_5, state.usButtonFlags);
|
||||
|
||||
// Get vertical mouse wheel
|
||||
// Get mouse wheel
|
||||
if ((state.usButtonFlags & RI_MOUSE_WHEEL))
|
||||
{
|
||||
m_handler->Scroll(m_index, static_cast<s16>(state.usButtonData));
|
||||
m_handler->Scroll(m_index, 0, std::clamp(static_cast<s16>(state.usButtonData) / WHEEL_DELTA, -128, 127));
|
||||
}
|
||||
else if ((state.usButtonFlags & RI_MOUSE_HWHEEL))
|
||||
{
|
||||
m_handler->Scroll(m_index, std::clamp(static_cast<s16>(state.usButtonData) / WHEEL_DELTA, -128, 127), 0);
|
||||
}
|
||||
|
||||
// Get horizontal mouse wheel. Ignored until needed.
|
||||
//if ((state.usButtonFlags & RI_MOUSE_HWHEEL))
|
||||
//{
|
||||
// m_handler->Scroll(m_index, static_cast<s16>(state.usButtonData));
|
||||
//}
|
||||
|
||||
// Get mouse movement
|
||||
if ((state.usFlags & MOUSE_MOVE_ABSOLUTE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue