Skip to content

Commit

Permalink
Merge pull request #22 from clandrew/patch-2
Browse files Browse the repository at this point in the history
Use of --hex command line arg doesn't require also specifying --autoRun
  • Loading branch information
dtremblay authored May 1, 2022
2 parents e2a5aff + 218b57c commit 066868c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Main/UI/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public partial class MainWindow : Form

public MainWindow(Dictionary<string, string> context)
{
bool autoRunCommandLineSpecified = false;
bool boardVersionCommandLineSpecified = false;

if (context != null)
{
if (context.ContainsKey("jumpStartAddress"))
Expand All @@ -71,6 +74,7 @@ public MainWindow(Dictionary<string, string> context)
if (context.ContainsKey("autoRun"))
{
autoRun = "true".Equals(context["autoRun"]);
autoRunCommandLineSpecified = true;
}
if (context.ContainsKey("disabledIRQs"))
{
Expand All @@ -90,12 +94,16 @@ public MainWindow(Dictionary<string, string> context)
{
version = BoardVersion.RevUPlus;
}
boardVersionCommandLineSpecified = true;
}
}
// If the user didn't specify context switches, read the ini setting
if (context == null)
if (!autoRunCommandLineSpecified)
{
autoRun = Simulator.Properties.Settings.Default.Autorun;
}
if (!boardVersionCommandLineSpecified)
{
switch (Simulator.Properties.Settings.Default.BoardRevision)
{
case "B":
Expand Down

0 comments on commit 066868c

Please sign in to comment.