input-settings/x11: Only warn once about missing udev support

Otherwise we end up logging the same message everytime we enter this function,
flooding the logs and making it annoying to spot other entries.
This commit is contained in:
Antoine Jacoutot 2019-01-22 02:20:49 +01:00
parent ff507273d2
commit 1ca60f424a

View File

@ -488,7 +488,14 @@ has_udev_property (MetaInputSettings *settings,
g_object_unref (parent_udev_device);
return FALSE;
#else
static gboolean warned_once = FALSE;
if (!warned_once)
{
g_warning ("Failed to set acceleration profile: no udev support");
warned_once = TRUE;
}
return FALSE;
#endif
}