MCPcopy Create free account
hub / github.com/SFML/SFML / hasMonitorEvent

Function hasMonitorEvent

src/SFML/Window/Unix/JoystickImpl.cpp:266–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266bool hasMonitorEvent()
267{
268 // This will not fail since we make sure udevMonitor is valid
269 const int monitorFd = udev_monitor_get_fd(udevMonitor.get());
270
271 pollfd fds{monitorFd, POLLIN, 0};
272
273 return (poll(&fds, 1, 0) > 0) && ((fds.revents & POLLIN) != 0);
274}
275
276// Get a property value from a udev device
277const char* getUdevAttribute(udev_device* udevDevice, const std::string& attributeName)

Callers 1

isConnectedMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected