From f9a791d93e83c29bbc32e73d6c143dd438566e83 Mon Sep 17 00:00:00 2001 From: The BombSquad <35253266+TheBombSquad@users.noreply.github.com> Date: Sat, 8 Apr 2023 14:59:32 -0400 Subject: [PATCH] Add conditional compilation to fix Mono build --- GxUtils/GxModelViewer/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GxUtils/GxModelViewer/Program.cs b/GxUtils/GxModelViewer/Program.cs index baa85ba..afb3afd 100644 --- a/GxUtils/GxModelViewer/Program.cs +++ b/GxUtils/GxModelViewer/Program.cs @@ -10,11 +10,13 @@ namespace GxModelViewer class MainClass { + #if !__MonoCS__ [DllImport("kernel32.dll")] private static extern IntPtr GetConsoleWindow(); [DllImport("user32.dll")] private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); + #endif private const int SW_HIDE = 0; private const int SW_SHOW = 5; @@ -50,8 +52,10 @@ public static void Main (string[] args) if (args.Length == 0) { + #if !__MonoCS__ var handle = GetConsoleWindow(); ShowWindow(handle, SW_HIDE); + #endif Application.Run(modelViewer); } else