View Issue Details

IDProjectCategoryView StatusLast Update
0004539The Dark ModGUIpublic08.08.2017 00:03
Reportergrayman Assigned Tograyman  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.06Fixed in VersionTDM 2.06 
Summary0004539: Identify 32-bit and 64-bit versions of TDM
DescriptionOn the GUIs where the TDM version is provided, extend it to show bit-ness.

I.e. "2.06/32" and "2.06/64"
TagsNo tags attached.

Activities

BluePill

BluePill

18.06.2017 20:58

reporter  

showcpuarch.txt (3,049 bytes)   
Index: game/Game_local.cpp
===================================================================
--- game/Game_local.cpp	(Revision 6944)
+++ game/Game_local.cpp	(Arbeitskopie)
@@ -521,9 +521,9 @@
 #endif
 
 	Printf( "--------- Initializing Game ----------\n" );
-	Printf( "%s %d.%02d, %s, code revision %d\n", 
+	Printf( "%s %d.%02d/%u, %s, code revision %d\n", 
 		GAME_VERSION, 
-		TDM_VERSION_MAJOR, TDM_VERSION_MINOR, 
+		TDM_VERSION_MAJOR, TDM_VERSION_MINOR, sizeof(void*) * 8, 
         BUILD_STRING,
 		RevisionTracker::Instance().GetHighestRevision() 
 	);
@@ -4596,7 +4596,7 @@
 	}
 	else if (cmd == "mainmenu_init")
 	{
-		gui->SetStateString("tdmversiontext", va("TDM %d.%02d", TDM_VERSION_MAJOR, TDM_VERSION_MINOR));
+		gui->SetStateString("tdmversiontext", va("TDM %d.%02d/%u", TDM_VERSION_MAJOR, TDM_VERSION_MINOR, sizeof(void*) * 8));
 		UpdateGUIScaling(gui);
 		gui->SetStateString( "tdm_lang", common->GetI18N()->GetCurrentLanguage().c_str() );
 		idStr gui_lang = "lang_"; gui_lang += common->GetI18N()->GetCurrentLanguage().c_str();
Index: framework/Common.cpp
===================================================================
--- framework/Common.cpp	(Revision 6944)
+++ framework/Common.cpp	(Arbeitskopie)
@@ -54,7 +54,7 @@
 	{
 		if (string[0] == 0x0)
 		{
-			sprintf( string, "%s #%d%s %s %s %s", ENGINE_VERSION, RevisionTracker::Instance().GetHighestRevision(), BUILD_DEBUG, BUILD_STRING, __DATE__, __TIME__ );
+			sprintf( string, "%s/%u #%d%s %s %s %s", ENGINE_VERSION, sizeof(void*) * 8, RevisionTracker::Instance().GetHighestRevision(), BUILD_DEBUG, BUILD_STRING, __DATE__, __TIME__ );
 		}
 
 		return string;
Index: framework/Console.cpp
===================================================================
--- framework/Console.cpp	(Revision 6944)
+++ framework/Console.cpp	(Arbeitskopie)
@@ -1118,7 +1118,7 @@
 	// draw the version number
 	renderSystem->SetColor( idStr::ColorForIndex( C_COLOR_CYAN ) );
 	{
-		const idStr version = va("%s #%d", ENGINE_VERSION, RevisionTracker::Instance().GetHighestRevision());
+		const idStr version = va("%s/%u #%d", ENGINE_VERSION, sizeof(void*) * 8, RevisionTracker::Instance().GetHighestRevision());
 		const int vlen = version.Length();
 
 		for ( x = 0; x < vlen; x++ ) {
Index: game/DarkModGlobals.cpp
===================================================================
--- game/DarkModGlobals.cpp	(Revision 6944)
+++ game/DarkModGlobals.cpp	(Arbeitskopie)
@@ -376,8 +376,8 @@
 
 	DM_LOG(LC_INIT, LT_INIT)LOGSTRING("DLL last cleaned and rebuilt on " __DATE__ " " __TIME__ "\r");
 
-	DM_LOG(LC_INIT, LT_INIT)LOGSTRING("%s %d.%02d, code revision %d\r", 
-		GAME_VERSION, TDM_VERSION_MAJOR, TDM_VERSION_MINOR, RevisionTracker::Instance().GetHighestRevision());
+	DM_LOG(LC_INIT, LT_INIT)LOGSTRING("%s %d.%02d/%u, code revision %d\r", 
+		GAME_VERSION, TDM_VERSION_MAJOR, TDM_VERSION_MINOR, sizeof(void*) * 8, RevisionTracker::Instance().GetHighestRevision());
 
 	CheckLogArray(iniFile, "LogBegin", LT_BEGIN);
 	CheckLogArray(iniFile, "LogEnd", LT_END);
showcpuarch.txt (3,049 bytes)   
BluePill

BluePill

18.06.2017 21:04

reporter   ~0008914

Added a diff file.
Added /32 or /64 to version strings in the console, log and main menu.
In case the cvar "si_version" isn't supposed to be touched, ignore the change to Common.cpp.
grayman

grayman

19.06.2017 01:33

administrator   ~0008915

Thanks.

I'll get this in and tested as soon as I have some time.
grayman

grayman

06.08.2017 20:22

administrator   ~0009059

Added BluePill's code.

Also added code so that the Window title would reflect the bit version.
stgatilov

stgatilov

07.08.2017 17:32

administrator   ~0009061

Debug build crashes on start.
Here is stack trace:
     TheDarkMod.exe!CGlobal::LogString(const char * fmt, ...) Line 326 C++
> TheDarkMod.exe!CGlobal::LoadINISettings(const std::shared_ptr<IniFile> & iniFile) Line 385 C++
     TheDarkMod.exe!CGlobal::Init() Line 274 C++
     TheDarkMod.exe!GetGameAPI(gameImport_t * import) Line 190 C++
     TheDarkMod.exe!TestGameAPI() Line 222 C++
     TheDarkMod.exe!idGameLocal::Init() Line 503 C++
     TheDarkMod.exe!idCommonLocal::LoadGameDLL() Line 2680 C++
     TheDarkMod.exe!idCommonLocal::InitGame() Line 3037 C++

Is this right:
    DM_LOG(LC_INIT, LT_INIT)LOGSTRING("%s %d.%02d/u, code revision %d (%s)\r",
        GAME_VERSION,
        TDM_VERSION_MAJOR,
        TDM_VERSION_MINOR,
        sizeof(void*) * 8,
        RevisionTracker::Instance().GetHighestRevision(),
        RevisionTracker::Instance().GetRevisionString());
?
grayman

grayman

07.08.2017 18:07

administrator   ~0009062

Hmmm.

Not sure how that snuck through. It built fine here and the executables ran.

Anyhoo, I corrected the line and committed it.

I can't test it because I'm changing other code right now and am not in a position to build binaries.
nbohr1more

nbohr1more

08.08.2017 00:03

developer   ~0009063

Fix confirmed.

I can compile my own SVN builds again.

Issue History

Date Modified Username Field Change
04.06.2017 17:08 grayman New Issue
18.06.2017 20:58 BluePill File Added: showcpuarch.txt
18.06.2017 21:04 BluePill Note Added: 0008914
19.06.2017 01:33 grayman Note Added: 0008915
19.06.2017 01:33 grayman Assigned To => grayman
19.06.2017 01:33 grayman Status new => assigned
06.08.2017 20:22 grayman Note Added: 0009059
06.08.2017 20:22 grayman Status assigned => resolved
06.08.2017 20:22 grayman Resolution open => fixed
06.08.2017 20:22 grayman Fixed in Version => TDM 2.06
07.08.2017 17:32 stgatilov Note Added: 0009061
07.08.2017 18:07 grayman Note Added: 0009062
08.08.2017 00:03 nbohr1more Note Added: 0009063