solved warning and cleaned up code

This commit is contained in:
Denis 2023-12-11 21:35:23 +01:00
parent 213f24c65f
commit 44326dc69c
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03
15 changed files with 40 additions and 1206 deletions

View file

@ -154,7 +154,7 @@ int64_t get_timediff_usec(const struct timeval *const past, const struct timeval
struct timeval tdiff;
timersub(now, past, &tdiff);
const int64_t sgn = ((now->tv_sec > past->tv_sec) || ((now->tv_sec == past->tv_sec) && (now->tv_usec > past->tv_usec))) ? -1 : +1;
//const int64_t sgn = ((now->tv_sec > past->tv_sec) || ((now->tv_sec == past->tv_sec) && (now->tv_usec > past->tv_usec))) ? -1 : +1;
return (int64_t)(tdiff.tv_sec) * (int64_t)1000000 + (int64_t)(tdiff.tv_usec);
}
@ -198,8 +198,8 @@ void *dev_out_thread_func(void *ptr) {
gettimeofday(&now, NULL);
struct timeval gamepad_last_hid_report_sent = now;
struct timeval mouse_last_hid_report_sent = now;
struct timeval keyboard_last_hid_report_sent = now;
//struct timeval mouse_last_hid_report_sent = now;
//struct timeval keyboard_last_hid_report_sent = now;
uint8_t tmp_buf[256];