mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-24 02:31:31 +00:00
@@ -164,6 +164,8 @@ void Mouse::Move(int x, int y, int center_x, int center_y) {
|
|||||||
void Mouse::NotifyChanged() {
|
void Mouse::NotifyChanged() {
|
||||||
auto const timestamp = Common::SteadyClock::Now();
|
auto const timestamp = Common::SteadyClock::Now();
|
||||||
if (button_pressed || has_moved) {
|
if (button_pressed || has_moved) {
|
||||||
|
UpdateStickInput(timestamp);
|
||||||
|
UpdateMotionInput(timestamp);
|
||||||
has_moved = false;
|
has_moved = false;
|
||||||
} else {
|
} else {
|
||||||
// neutral due to no movement or press
|
// neutral due to no movement or press
|
||||||
@@ -183,8 +185,6 @@ void Mouse::NotifyChanged() {
|
|||||||
.delta_timestamp = u64(std::chrono::duration_cast<std::chrono::microseconds>(timestamp - last_notify_timestamp).count()),
|
.delta_timestamp = u64(std::chrono::duration_cast<std::chrono::microseconds>(timestamp - last_notify_timestamp).count()),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
UpdateStickInput(timestamp);
|
|
||||||
UpdateMotionInput(timestamp);
|
|
||||||
last_notify_timestamp = timestamp;
|
last_notify_timestamp = timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user