mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-05 07:15:30 -04:00
render: fix compilation errors in 32-bit builds
timeval.tv_usec is an 'unsigned long long' on 32-bit
This commit is contained in:
parent
12e3a7e2a2
commit
187fe3a586
1 changed files with 9 additions and 6 deletions
15
render.c
15
render.c
|
|
@ -136,14 +136,16 @@ presented(void *data,
|
||||||
if (use_input) {
|
if (use_input) {
|
||||||
struct timeval diff;
|
struct timeval diff;
|
||||||
timersub(commit, input, &diff);
|
timersub(commit, input, &diff);
|
||||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
chars += snprintf(
|
||||||
"input - %lu µs -> ", diff.tv_usec);
|
&msg[chars], sizeof(msg) - chars,
|
||||||
|
"input - %llu µs -> ", (unsigned long long)diff.tv_usec);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct timeval diff;
|
struct timeval diff;
|
||||||
timersub(&presented, commit, &diff);
|
timersub(&presented, commit, &diff);
|
||||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
chars += snprintf(
|
||||||
"commit - %lu µs -> ", diff.tv_usec);
|
&msg[chars], sizeof(msg) - chars,
|
||||||
|
"commit - %llu µs -> ", (unsigned long long)diff.tv_usec);
|
||||||
|
|
||||||
if (use_input) {
|
if (use_input) {
|
||||||
assert(timercmp(&presented, input, >));
|
assert(timercmp(&presented, input, >));
|
||||||
|
|
@ -153,8 +155,9 @@ presented(void *data,
|
||||||
timersub(&presented, commit, &diff);
|
timersub(&presented, commit, &diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
chars += snprintf(
|
||||||
"presented (total: %lu µs)", diff.tv_usec);
|
&msg[chars], sizeof(msg) - chars,
|
||||||
|
"presented (total: %llu µs)", (unsigned long long)diff.tv_usec);
|
||||||
|
|
||||||
unsigned frame_count = 0;
|
unsigned frame_count = 0;
|
||||||
if (tll_length(term->window->on_outputs) > 0) {
|
if (tll_length(term->window->on_outputs) > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue