From 513e9ae9e39f76465f8a3ec8c8de2551eaaaf00b Mon Sep 17 00:00:00 2001 From: ComputerElite Date: Wed, 7 Jun 2023 11:44:41 +0200 Subject: [PATCH] allow showing of versions based on appId --- Program.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Program.cs b/Program.cs index afaf756..60e973e 100644 --- a/Program.cs +++ b/Program.cs @@ -43,7 +43,7 @@ static void Main(string[] args) { Logger.SetLogFile(AppDomain.CurrentDomain.BaseDirectory + "Log.log"); SetupExceptionHandlers(); - DowngradeManager.updater = new Updater("1.11.19", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus downgrader", Assembly.GetExecutingAssembly().Location); + DowngradeManager.updater = new Updater("1.11.20", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus downgrader", Assembly.GetExecutingAssembly().Location); Logger.LogRaw("\n\n"); Logger.Log("Starting Oculus downgrader version " + DowngradeManager.updater.version); if (args.Length == 1 && args[0] == "--update") @@ -95,16 +95,16 @@ static void Main(string[] args) public static void SetupExceptionHandlers() { AppDomain.CurrentDomain.UnhandledException += (s, e) => - HandleExtenption((Exception)e.ExceptionObject); + HandleException((Exception)e.ExceptionObject); TaskScheduler.UnobservedTaskException += (s, e) => { - HandleExtenption(e.Exception); + HandleException(e.Exception); e.SetObserved(); }; } - public static void HandleExtenption(Exception e) + public static void HandleException(Exception e) { Logger.Log("An unhandled exception has occured:\n" + e.ToString(), LoggingType.Crash); DowngradeManager.Error("\n\nAn unhandled exception has occured. Check the log for more info and send it to ComputerElite for the (probably) bug to get fixed. Press any key to close out."); @@ -260,7 +260,7 @@ public void HandleCLIArgs() if (commands.HasArgument("download")) { auto = true; - if((commands.HasArgument("--appname") || commands.HasArgument("--appid")) && (commands.HasArgument("--versionstring") || commands.HasArgument("--versioncode") || commands.HasArgument("--versionid")) || commands.HasArgument("--search") && commands.HasArgument("--")) + if((commands.HasArgument("--appname") || commands.HasArgument("--appid")) && (commands.HasArgument("--versionstring") || commands.HasArgument("--versioncode") || commands.HasArgument("--versionid") || commands.HasArgument("--userexecuted")) || commands.HasArgument("--search") && commands.HasArgument("--")) { if(commands.HasArgument("--appid")) { @@ -321,7 +321,7 @@ public void Menu() Console.WriteLine("[10] Create Backup"); Console.WriteLine("[11] Direct execute"); Console.WriteLine("[12] Open graphical ui"); - Console.WriteLine("[14] Exit"); + Console.WriteLine("[13] Exit"); string choice = ConsoleUiController.QuestionString("Choice: "); Logger.Log("User choose option " + choice); switch (choice) @@ -1287,7 +1287,7 @@ public void ShowVersions(string appId) AndroidBinary selected = new AndroidBinary(); if (ver == "") { - if(!cont && auto) + if(!cont && auto && !commands.HasArgument("--userexecuted")) { Error("No version found"); Environment.Exit(1);