We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 829b5f1 commit 8371cc2Copy full SHA for 8371cc2
src/inputdaemon.cpp
@@ -853,7 +853,12 @@ void InputDaemon::firstInputPass(QQueue<SDL_Event> *sdlEventQueue)
853
sensor_type = ACCELEROMETER;
854
else if (event.csensor.sensor == SDL_SENSOR_GYRO)
855
sensor_type = GYROSCOPE;
856
- JoySensor *sensor = set->getSensor(sensor_type);
+ else
857
+ qWarning() << "Unknown sensor type: " << event.csensor.sensor;
858
+
859
+ JoySensor *sensor = nullptr;
860
+ if (sensor_type == ACCELEROMETER || sensor_type == GYROSCOPE)
861
+ sensor = set->getSensor(sensor_type);
862
863
if (sensor != nullptr)
864
{
0 commit comments