mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05: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) {
|
||||
struct timeval diff;
|
||||
timersub(commit, input, &diff);
|
||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
||||
"input - %lu µs -> ", diff.tv_usec);
|
||||
chars += snprintf(
|
||||
&msg[chars], sizeof(msg) - chars,
|
||||
"input - %llu µs -> ", (unsigned long long)diff.tv_usec);
|
||||
}
|
||||
|
||||
struct timeval diff;
|
||||
timersub(&presented, commit, &diff);
|
||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
||||
"commit - %lu µs -> ", diff.tv_usec);
|
||||
chars += snprintf(
|
||||
&msg[chars], sizeof(msg) - chars,
|
||||
"commit - %llu µs -> ", (unsigned long long)diff.tv_usec);
|
||||
|
||||
if (use_input) {
|
||||
assert(timercmp(&presented, input, >));
|
||||
|
|
@ -153,8 +155,9 @@ presented(void *data,
|
|||
timersub(&presented, commit, &diff);
|
||||
}
|
||||
|
||||
chars += snprintf(&msg[chars], sizeof(msg) - chars,
|
||||
"presented (total: %lu µs)", diff.tv_usec);
|
||||
chars += snprintf(
|
||||
&msg[chars], sizeof(msg) - chars,
|
||||
"presented (total: %llu µs)", (unsigned long long)diff.tv_usec);
|
||||
|
||||
unsigned frame_count = 0;
|
||||
if (tll_length(term->window->on_outputs) > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue