fix games that expect null-delta motion events

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2026-05-17 22:58:48 -04:00
parent ee48612a08
commit b261f5f084
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6

View file

@ -125,11 +125,12 @@ public:
std::scoped_lock lock{mutex};
const u64 sensor_timestamp = event.sensor_timestamp != 0 ? event.sensor_timestamp
: event.timestamp;
if (last_motion_update == 0) {
last_motion_update = sensor_timestamp;
return false;
}
if (sensor_timestamp <= last_motion_update) {
if (sensor_timestamp < last_motion_update) {
return false;
}