Decompile fn_04726 (CMouse::Update)

Batch #10598 by dori: 0 byte-identical, 1 confirmed by peer review.

- fn_04726 CMouse::Update: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, Toshiro, cremane
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-04 14:57:01 +00:00
commit e12d5df3b4

View file

@ -27,18 +27,18 @@ void CMouse::Update() {
this->pressTicks[index] = now - this->doubleClickTime;
}
if (this->pendingButtons[index]) {
if (this->previousButtons[index]) {
this->buttons[index] = 2;
} else if (now >= this->pressTicks[index] + this->doubleClickTime) {
this->pressTicks[index] = now;
this->buttons[index] = 1;
} else {
if (!this->pendingButtons[index]) {
this->buttons[index] = this->previousButtons[index] ? 3 : 0;
} else if (!this->previousButtons[index]) {
if (now < this->pressTicks[index] + this->doubleClickTime) {
this->buttons[index] = 4;
this->pressTicks[index] = now - this->doubleClickTime;
} else {
this->pressTicks[index] = now;
this->buttons[index] = 1;
}
} else {
this->buttons[index] = this->previousButtons[index] ? 3 : 0;
this->buttons[index] = 2;
}
}