mirror of
https://github.com/livingcomputermuseum/Darkstar.git
synced 2026-02-26 00:53:37 +00:00
Added Fullscreen support and a few shortcut keys. Modified TOD clock reset (if No Change is selected, the Power Loss flag is set at emulation reset). Added -config and -rompath startup flags.
This commit is contained in:
52
D/Program.cs
52
D/Program.cs
@@ -32,11 +32,58 @@ using D.UI;
|
||||
|
||||
namespace D
|
||||
{
|
||||
public static class StartupOptions
|
||||
{
|
||||
public static string ConfigurationFile;
|
||||
|
||||
public static string RomPath;
|
||||
|
||||
}
|
||||
public class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//
|
||||
// Check for command-line arguments.
|
||||
//
|
||||
if (args.Length > 0)
|
||||
{
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
switch (args[i++].ToLowerInvariant())
|
||||
{
|
||||
case "-config":
|
||||
if (i < args.Length)
|
||||
{
|
||||
StartupOptions.ConfigurationFile = args[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case "-rompath":
|
||||
if (i < args.Length)
|
||||
{
|
||||
StartupOptions.RomPath = args[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PrintHerald();
|
||||
|
||||
// Cons up a system to run stuff on.
|
||||
@@ -72,5 +119,10 @@ namespace D
|
||||
Console.WriteLine("Bug reports to joshd@livingcomputers.org");
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private static void PrintUsage()
|
||||
{
|
||||
Console.WriteLine("Usage: Darkstar [-config <configurationFile>] [-rompath <path>]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user