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 47d8883 commit 0bb0077Copy full SHA for 0bb0077
input/common/linux_common.c
@@ -201,6 +201,10 @@ linux_illuminance_sensor_t *linux_open_illuminance_sensor(unsigned rate)
201
if (!sensor)
202
goto error;
203
204
+ device = retro_opendir(IIO_DEVICES_DIR);
205
+ if (!device)
206
+ goto error;
207
+
208
sensor->millilux = 0;
209
sensor->poll_rate = rate ? rate : DEFAULT_POLL_RATE;
210
sensor->thread = NULL; /* We'll spawn a thread later, once we find a sensor */
@@ -243,7 +247,7 @@ linux_illuminance_sensor_t *linux_open_illuminance_sensor(unsigned rate)
243
247
}
244
248
245
249
error:
246
- RARCH_ERR("Failed to find an illuminance sensor\n");
250
+ RARCH_ERR("Failed to find an illuminance sensor in " IIO_DEVICES_DIR "\n");
251
retro_closedir(device);
252
253
free(sensor);
0 commit comments