From f3290fea568b63b4a786283b4acacc158a6b612a Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:35:26 +0200 Subject: [PATCH 1/2] fix(input): Fix broken single click command after right mouse double click --- .../Source/GameClient/MessageStream/CommandXlat.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index a6b9e2d19d..e4c9f655da 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3874,6 +3874,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage } //----------------------------------------------------------------------------- + // TheSuperHackers @bugfix Treat the raw double click event identical to the raw button down event + // because it implicitly is a raw button down event as well. Failing to do so would mess with the + // button timings in later events on button up. + case GameMessage::MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK: case GameMessage::MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN: { // There are two ways in which we can ignore this as a deselect: From 62bcb42e0fc5ffae302bb820a67679f14c21ee05 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Tue, 23 Sep 2025 08:55:21 +0200 Subject: [PATCH 2/2] Replicate in Generals --- .../Source/GameClient/MessageStream/CommandXlat.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index eebfe67423..e76839a56b 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3533,9 +3533,13 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage } //----------------------------------------------------------------------------- - case GameMessage::MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN: - { - // There are two ways in which we can ignore this as a deselect: + // TheSuperHackers @bugfix Treat the raw double click event identical to the raw button down event + // because it implicitly is a raw button down event as well. Failing to do so would mess with the + // button timings in later events on button up. + case GameMessage::MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK: + case GameMessage::MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN: + { + // There are two ways in which we can ignore this as a deselect: // 1) 2-D position on screen // 2) Time has exceeded the time which we allow for this to be a click. m_mouseRightDragAnchor = msg->getArgument( 0 )->pixel;