Make timer init part of platform API

This is part of runtime platform selection because the null backend
needs the timer implementation for the current OS.
This commit is contained in:
Camilla Löwy
2021-07-16 13:53:31 +02:00
parent 6d51b39106
commit e31deedc99
13 changed files with 10 additions and 44 deletions

View File

@@ -1227,8 +1227,6 @@ int _glfwPlatformInit(void)
// Sync so we got all initial output events
wl_display_roundtrip(_glfw.wl.display);
_glfwInitTimerPOSIX();
_glfw.wl.timerfd = -1;
if (_glfw.wl.seatVersion >= 4)
_glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);