mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
committed by
Kirill Chibisov
parent
3eb731f8b5
commit
69b8a07ae0
@@ -234,9 +234,7 @@ impl XConnection {
|
||||
// Store the timestamp in the slot if it's greater than the last one.
|
||||
let mut last_timestamp = self.timestamp.load(Ordering::Relaxed);
|
||||
loop {
|
||||
let wrapping_sub = |a: xproto::Timestamp, b: xproto::Timestamp| (a as i32) - (b as i32);
|
||||
|
||||
if wrapping_sub(timestamp, last_timestamp) <= 0 {
|
||||
if (timestamp as i32).wrapping_sub(last_timestamp as i32) <= 0 {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user