This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -965,23 +965,17 @@ namespace RTE {
965
965
}
966
966
}
967
967
968
- // Mouse wheel update, translate motion into discrete ticks
969
- if (std::abs (mouse_z) >= 1 ) {
970
- m_MouseWheelChange = mouse_z;
971
- position_mouse_z (0 );
972
- } else {
973
- m_MouseWheelChange = 0 ;
974
- }
975
-
976
968
// Enable the mouse cursor positioning again after having been disabled. Only do this when the mouse is within the drawing area so it
977
969
// won't cause the whole window to move if the user clicks the title bar and unintentionally drags it due to programmatic positioning.
978
970
int mousePosX = mouse_x / g_FrameMan.ResolutionMultiplier ();
979
971
int mousePosY = mouse_y / g_FrameMan.ResolutionMultiplier ();
980
972
if (m_DisableMouseMoving && m_PrepareToEnableMouseMoving && (mousePosX >= 0 && mousePosX < g_FrameMan.GetResX () && mousePosY >= 0 && mousePosY < g_FrameMan.GetResY ())) {
981
973
m_DisableMouseMoving = m_PrepareToEnableMouseMoving = false ;
982
974
}
983
- } else if (g_InActivity == false ) {
984
- // Mouse wheel update for menus, regardless of player devices.
975
+ }
976
+ if (mousePlayer != Players::NoPlayer || g_InActivity == false ) {
977
+ // Mouse wheel update happens while a device is kb+mouse and while in the menus regardless of player devices.
978
+ // Translate motion into discrete ticks.
985
979
if (std::abs (mouse_z) >= 1 ) {
986
980
m_MouseWheelChange = mouse_z;
987
981
position_mouse_z (0 );
You can’t perform that action at this time.
0 commit comments