summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-10-27 13:40:42 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-10-27 13:40:42 -0400
commitf44eb6d66f547f15d87e273c2cb1f4597eee532a (patch)
treef03e6de0878bc207d93290c6083c555f5ea77691 /src/StardewModdingAPI/Program.cs
parent2ea2068486b5b2bff844aa5e57c11de0434c6ada (diff)
downloadSMAPI-f44eb6d66f547f15d87e273c2cb1f4597eee532a.tar.gz
SMAPI-f44eb6d66f547f15d87e273c2cb1f4597eee532a.tar.bz2
SMAPI-f44eb6d66f547f15d87e273c2cb1f4597eee532a.zip
only hook into WinForms on Windows for Mac compatibility (#126)
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index f6c63851..b8a8b856 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -5,7 +5,9 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
+#if SMAPI_FOR_WINDOWS
using System.Windows.Forms;
+#endif
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StardewModdingAPI.Events;
@@ -208,8 +210,10 @@ namespace StardewModdingAPI
public static void RunGame()
{
+#if SMAPI_FOR_WINDOWS
Application.ThreadException += Log.Application_ThreadException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
+#endif
AppDomain.CurrentDomain.UnhandledException += Log.CurrentDomain_UnhandledException;
try