Skip to content

Commit

Permalink
allow showing of versions based on appId
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputerElite authored and ComputerElite committed Jun 7, 2023
1 parent c48a55c commit 513e9ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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"))
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 513e9ae

Please sign in to comment.