From e254ec7c375b9e4f368fb3c2771cff769a8c818e Mon Sep 17 00:00:00 2001 From: Evan Dixon Date: Tue, 16 May 2017 20:55:24 -0500 Subject: [PATCH] Activate illegal mode with commandline arg Workaround for PKHaX being broken. Trimming each argument allows "hax", "-hax", and "--hax" to all work for activating illegal mode. --- PKHeX.WinForms/MainWindow/Main.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index 5ee887666..3da69a224 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -149,8 +149,7 @@ public Main() #endregion #region Localize & Populate Fields string[] args = Environment.GetCommandLineArgs(); - string filename = args.Length > 0 ? Path.GetFileNameWithoutExtension(args[0])?.ToLower() : ""; - HaX = filename?.IndexOf("hax", StringComparison.Ordinal) >= 0; + HaX = args.Any(x => x.Trim('-').ToLower() == "hax"); bool showChangelog = false; bool BAKprompt = false;