Fixes
This commit is contained in:
@ -74,7 +74,8 @@ namespace ia::iae
|
||||
|
||||
case SDL_EVENT_FINGER_MOTION:
|
||||
case SDL_EVENT_MOUSE_MOTION:
|
||||
s_pointerPosition = {event->motion.x, event->motion.y};
|
||||
if((event->motion.x >= 1) && (event->motion.y >= 1))
|
||||
s_pointerPosition = {event->motion.x, event->motion.y};
|
||||
break;
|
||||
|
||||
case SDL_EVENT_MOUSE_BUTTON_DOWN:
|
||||
@ -236,6 +237,10 @@ namespace ia::iae
|
||||
STATIC CONSTEXPR INT16 DIRECTION_MAP_VERTICAL[] = {0, 1, 1, 1, 0, -1, -1, -1};
|
||||
STATIC CONSTEXPR INT16 DIRECTION_MAP_HORIZONTAL[] = {1, 1, 0, -1, -1, -1, 0, 1};
|
||||
|
||||
const auto ps = g_onScreenGamepadState;
|
||||
g_onScreenGamepadState.ThumbstickPosition *= Engine::GetSceneScalingFactor();
|
||||
g_onScreenGamepadState.ThumbstickRadius *= Engine::GetSceneScalingFactor().x;
|
||||
|
||||
if (Engine::Input_IsPointerDown(g_onScreenGamepadState.ThumbstickPosition,
|
||||
g_onScreenGamepadState.ThumbstickRadius))
|
||||
g_onScreenGamepadState.KnobPosition =
|
||||
@ -257,6 +262,9 @@ namespace ia::iae
|
||||
s_verticalAxis = DIRECTION_MAP_VERTICAL[t];
|
||||
s_horizontalAxis = DIRECTION_MAP_HORIZONTAL[t];
|
||||
}
|
||||
|
||||
g_onScreenGamepadState.ThumbstickPosition = ps.ThumbstickPosition;
|
||||
g_onScreenGamepadState.ThumbstickRadius = ps.ThumbstickRadius;
|
||||
}
|
||||
|
||||
if (s_keyboardGamePadEnabled)
|
||||
|
||||
Reference in New Issue
Block a user