Skip to content

Commit 3d3bd29

Browse files
committed
Changed to Git short hash because of limited space in the 'Status' tab.
1 parent 982021d commit 3d3bd29

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Core/GameEngine/Include/GameNetwork/GameInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class GameSlot
6262
UnsignedInt exeCRC;
6363
UnsignedInt iniCRC;
6464
UnsignedInt productVersion;
65-
AsciiString gitTagOrHash;
65+
AsciiString gitShortHash;
6666
UnicodeString productName;
6767
};
6868

Core/GameEngine/Include/GameNetwork/LANAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ struct LANMessage
431431
UnsignedInt exeCRC;
432432
UnsignedInt iniCRC;
433433
UnsignedInt productVersion;
434-
Char gitTagOrHash[33];
434+
Char gitShortHash[42];
435435
WideChar productName[129];
436436
} ProductInfo;
437437
};

Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void LANAPI::setProductInfoFromLocalData(GameSlot *slot)
4747
productInfo.exeCRC = TheGlobalData->m_exeCRC;
4848
productInfo.iniCRC = TheGlobalData->m_iniCRC;
4949
productInfo.productVersion = TheVersion->getVersionNumber();
50-
productInfo.gitTagOrHash = TheVersion->getAsciiGitTagOrHash();
50+
productInfo.gitShortHash = TheVersion->getAsciiGitShortHash();
5151
productInfo.productName = TheVersion->getUnicodeProductString();
5252

5353
slot->setProductInfo(productInfo);
@@ -59,7 +59,7 @@ void LANAPI::setProductInfoFromMessage(LANMessage *msg, GameSlot *slot)
5959
productInfo.exeCRC = msg->ProductInfo.exeCRC;
6060
productInfo.iniCRC = msg->ProductInfo.iniCRC;
6161
productInfo.productVersion = msg->ProductInfo.productVersion;
62-
productInfo.gitTagOrHash = msg->ProductInfo.gitTagOrHash;
62+
productInfo.gitShortHash = msg->ProductInfo.gitShortHash;
6363
productInfo.productName = msg->ProductInfo.productName;
6464

6565
slot->setProductInfo(productInfo);
@@ -74,7 +74,7 @@ void LANAPI::sendProductInfoMessage(Int messageType, UnsignedInt senderIP)
7474
msg.ProductInfo.exeCRC = TheGlobalData->m_exeCRC;
7575
msg.ProductInfo.iniCRC = TheGlobalData->m_iniCRC;
7676
msg.ProductInfo.productVersion = TheVersion->getVersionNumber();
77-
strlcpy(msg.ProductInfo.gitTagOrHash, TheVersion->getAsciiGitTagOrHash().str(), ARRAY_SIZE(msg.ProductInfo.gitTagOrHash));
77+
strlcpy(msg.ProductInfo.gitShortHash, TheVersion->getAsciiGitShortHash().str(), ARRAY_SIZE(msg.ProductInfo.gitShortHash));
7878
wcslcpy(msg.ProductInfo.productName, TheVersion->getUnicodeProductString().str(), ARRAY_SIZE(msg.ProductInfo.productName));
7979

8080
sendMessage(&msg, senderIP);

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,10 @@ void PopulateInGameDiplomacyPopup( void )
576576
// TheSuperHackers @feature Caball009 06/11/2025 Set special status for players that are using a patched client version.
577577
if (slot->isHuman() && slot->getProductInfo().productVersion > 0)
578578
{
579-
UnicodeString gitTagOrHash;
580-
gitTagOrHash.translate(slot->getProductInfo().gitTagOrHash);
579+
UnicodeString gitShortHash;
580+
gitShortHash.translate(slot->getProductInfo().gitShortHash);
581581

582-
text.format(L"%s [%s]", text.str(), gitTagOrHash.str());
582+
text.format(L"%s [%s]", text.str(), gitShortHash.str());
583583
}
584584

585585
staticTextStatus[rowNum]->winSetEnabledTextColors(frontColor, backColor);

0 commit comments

Comments
 (0)