solved warning and cleaned up code
This commit is contained in:
parent
213f24c65f
commit
44326dc69c
15 changed files with 40 additions and 1206 deletions
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue