diff --git a/src/Apps/GameDesktop/GameDesktop.csproj b/src/Apps/GameDesktop/GameDesktop.csproj
index 0ce582c..c82dae2 100644
--- a/src/Apps/GameDesktop/GameDesktop.csproj
+++ b/src/Apps/GameDesktop/GameDesktop.csproj
@@ -35,6 +35,10 @@
ResXFileCodeGenerator
SpriteSheets.Designer.cs
+
+ ResXFileCodeGenerator
+ Errors.Designer.cs
+
@@ -73,6 +77,11 @@
True
SpriteSheets.resx
+
+ True
+ True
+ Errors.resx
+
diff --git a/src/Apps/GameDesktop/Program.cs b/src/Apps/GameDesktop/Program.cs
index 5256c2c..7dee8d6 100644
--- a/src/Apps/GameDesktop/Program.cs
+++ b/src/Apps/GameDesktop/Program.cs
@@ -1,11 +1,14 @@
using System;
using GameDesktop;
+using GameDesktop.Resources;
using LightInject;
using Microsoft.Extensions.Configuration;
using Serilog;
using Serilog.Core;
IConfigurationRoot configuration = ConfigurationFactory.Create();
+bool IsCI = configuration.GetValue("IS_CI", "false") == "true";
+
using Logger logger = LogFactory.Create(configuration);
logger.ForContext().Verbose("Configuration & Logger (+ Sentry) initialized");
@@ -30,6 +33,12 @@
}
catch (Exception e)
{
+ if (e.Source.Contains(Errors.NoGraphicsDeviceSource) &&
+ e.Message.Contains(Errors.NoGraphicsDeviceMessage) && IsCI)
+ {
+ Environment.Exit(0);
+ }
+
logger.ForContext().Fatal(e.ToString());
Environment.Exit(1);
}
diff --git a/src/Apps/GameDesktop/Resources/Errors.Designer.cs b/src/Apps/GameDesktop/Resources/Errors.Designer.cs
new file mode 100644
index 0000000..4afd4d1
--- /dev/null
+++ b/src/Apps/GameDesktop/Resources/Errors.Designer.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GameDesktop.Resources {
+ using System;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Errors {
+
+ private static System.Resources.ResourceManager resourceMan;
+
+ private static System.Globalization.CultureInfo resourceCulture;
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Errors() {
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.Equals(null, resourceMan)) {
+ System.Resources.ResourceManager temp = new System.Resources.ResourceManager("GameDesktop.Resources.Errors", typeof(Errors).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static string NoGraphicsDeviceSource {
+ get {
+ return ResourceManager.GetString("NoGraphicsDeviceSource", resourceCulture);
+ }
+ }
+
+ internal static string NoGraphicsDeviceMessage {
+ get {
+ return ResourceManager.GetString("NoGraphicsDeviceMessage", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Apps/GameDesktop/Resources/Errors.resx b/src/Apps/GameDesktop/Resources/Errors.resx
new file mode 100644
index 0000000..385a240
--- /dev/null
+++ b/src/Apps/GameDesktop/Resources/Errors.resx
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
+ PublicKeyToken=b77a5c561934e089
+
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
+ PublicKeyToken=b77a5c561934e089
+
+
+
+ Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException
+ Failed to create graphics device!
+
\ No newline at end of file