mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
output: fix clock_gettime return value handling
This commit is contained in:
parent
54e1287f30
commit
abddfc99f2
1 changed files with 2 additions and 1 deletions
|
|
@ -566,7 +566,8 @@ void wlr_output_send_present(struct wlr_output *output, struct timespec *when,
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
if (when == NULL) {
|
if (when == NULL) {
|
||||||
clockid_t clock = wlr_backend_get_present_clock(output->backend);
|
clockid_t clock = wlr_backend_get_present_clock(output->backend);
|
||||||
if (!clock_gettime(clock, &now)) {
|
errno = 0;
|
||||||
|
if (clock_gettime(clock, &now) != 0) {
|
||||||
wlr_log_errno(WLR_ERROR, "failed to send output present event: "
|
wlr_log_errno(WLR_ERROR, "failed to send output present event: "
|
||||||
"failed to read clock");
|
"failed to read clock");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue