From 366d57b98df2807d9bfa1607d5f3730775601025 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 6 Mar 2018 14:35:09 +0200 Subject: [PATCH] Crash reports & main menu show a "debug build" text in debug builds --- Barotrauma/BarotraumaClient/Source/Program.cs | 4 ++++ Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Barotrauma/BarotraumaClient/Source/Program.cs b/Barotrauma/BarotraumaClient/Source/Program.cs index ed6540247..ee47273d8 100644 --- a/Barotrauma/BarotraumaClient/Source/Program.cs +++ b/Barotrauma/BarotraumaClient/Source/Program.cs @@ -137,7 +137,11 @@ namespace Barotrauma sb.AppendLine("Barotrauma seems to have crashed. Sorry for the inconvenience! "); sb.AppendLine("If you'd like to help fix the bug that caused the crash, please send this file to the developers on the Undertow Games forums."); sb.AppendLine("\n"); +#if DEBUG + sb.AppendLine("Game version " + GameMain.Version + " (debug build)"); +#else sb.AppendLine("Game version " + GameMain.Version); +#endif sb.AppendLine("Graphics mode: " + GameMain.Config.GraphicsWidth + "x" + GameMain.Config.GraphicsHeight + " (" + GameMain.Config.WindowMode.ToString() + ")"); sb.AppendLine("Selected content package: " + GameMain.SelectedPackage.Name); sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed)); diff --git a/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs index 95c1435de..6f9e323b1 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/MainMenuScreen.cs @@ -334,7 +334,11 @@ namespace Barotrauma GUI.Draw((float)deltaTime, spriteBatch, null); +#if DEBUG + GUI.Font.DrawString(spriteBatch, "Barotrauma v" + GameMain.Version + " (debug build)", new Vector2(10, GameMain.GraphicsHeight - 20), Color.White); +#else GUI.Font.DrawString(spriteBatch, "Barotrauma v" + GameMain.Version, new Vector2(10, GameMain.GraphicsHeight - 20), Color.White); +#endif spriteBatch.End(); }