Skip to content

Commit 61fc94f

Browse files
committed
fix menu cursor control; increase digi axis thresholds
1 parent 8e21f7c commit 61fc94f

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Source/Managers/UInputMan.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,12 @@ namespace RTE {
343343

344344
/// Gets whether the mouse wheel has been moved past the threshold limit in either direction this frame.
345345
/// @return The direction the mouse wheel has been moved which is past that threshold. 0 means not past, negative means moved down, positive means moved up.
346-
int MouseWheelMoved() const { return m_MouseWheelChange; }
346+
int MouseWheelMoved() const { return m_MouseStates.at(0).wheelChange; }
347347

348348
/// Gets the relative mouse wheel position for the specified player.
349349
/// @param player The player to get mouse wheel position for.
350350
/// @return The relative mouse wheel position for the specified player.
351-
int MouseWheelMovedByPlayer(int player) const {
352-
return m_MouseWheelChange;
353-
}
354-
351+
int MouseWheelMovedByPlayer(int player) const;
355352
/// Return true if there are any mouse button presses at all.
356353
/// @return Whether any mouse buttons have been pressed at all since last frame.
357354
bool AnyMouseButtonPress(SDL_MouseID mouseID = 0) const;
@@ -509,11 +506,7 @@ namespace RTE {
509506
std::array<InputScheme, Players::MaxPlayerCount> m_ControlScheme; //!< Which control scheme is being used by each player.
510507
const Icon* m_DeviceIcons[InputDevice::DEVICE_COUNT]; //!< The Icons representing all different devices.
511508

512-
Vector m_AbsoluteMousePos; //!< The absolute mouse position in screen coordinates.
513-
Vector m_RawMouseMovement; //!< The raw absolute movement of the mouse between the last two Updates.
514-
Vector m_AnalogMouseData; //!< The emulated analog stick position of the mouse.
515509
float m_MouseSensitivity; //!< Mouse sensitivity multiplier while in Activity. HAS NO EFFECT IN MENUS.
516-
int m_MouseWheelChange; //!< The relative mouse wheel position since last reset of it.
517510

518511
bool m_TrapMousePos; //!< Whether the mouse is trapped in the middle of the screen each update or not.
519512
float m_MouseTrapRadius; //!< The radius (in pixels) of the circle trapping the mouse for analog mouse data.
@@ -532,8 +525,8 @@ namespace RTE {
532525
bool m_PrepareToEnableMouseMoving;
533526

534527
static constexpr double c_GamepadAxisLimit = 32767.0; //!< Maximum axis value as defined by SDL (int16 max).
535-
static constexpr int c_AxisDigitalPressedThreshold = 8192; //!< Digital Axis threshold value as defined by allegro.
536-
static constexpr int c_AxisDigitalReleasedThreshold = c_AxisDigitalPressedThreshold - 100; //!< Digital Axis release threshold, to debounce values.
528+
static constexpr int c_AxisDigitalPressedThreshold = 16384; //!< Digital Axis threshold value as defined by allegro.
529+
static constexpr int c_AxisDigitalReleasedThreshold = 8192; //!< Digital Axis release threshold, to debounce values.
537530

538531
#pragma region Mouse Handling
539532
/// Forces the mouse within a specific player's screen area.

0 commit comments

Comments
 (0)