From 7b4e17be3775bef49962f9ed679869d76eda389f Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 12 May 2024 20:59:53 -0500 Subject: [PATCH] Remove unnecessary round trip conversion --- src/SFML/Window/Android/SensorImpl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/SFML/Window/Android/SensorImpl.cpp b/src/SFML/Window/Android/SensorImpl.cpp index cb79771f9..ca43b6d50 100644 --- a/src/SFML/Window/Android/SensorImpl.cpp +++ b/src/SFML/Window/Android/SensorImpl.cpp @@ -99,11 +99,8 @@ bool SensorImpl::open(Sensor::Type sensor) if (!m_sensor) return false; - // Get the minimum delay allowed between events - const Time minimumDelay = microseconds(ASensor_getMinDelay(m_sensor)); - // Set the event rate (not to consume too much battery) - ASensorEventQueue_setEventRate(sensorEventQueue, m_sensor, static_cast(minimumDelay.asMicroseconds())); + ASensorEventQueue_setEventRate(sensorEventQueue, m_sensor, ASensor_getMinDelay(m_sensor)); // Save the type of the sensor m_type = sensor;