From 9b3d57759df3cc462dbff48044a28766a6df4623 Mon Sep 17 00:00:00 2001 From: otya128 Date: Mon, 10 Jul 2017 19:46:40 +0900 Subject: [PATCH] Add --hardware --- SMILEBASIC/main.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SMILEBASIC/main.d b/SMILEBASIC/main.d index 30e64ef..ff50f38 100644 --- a/SMILEBASIC/main.d +++ b/SMILEBASIC/main.d @@ -13,7 +13,9 @@ int main(string[] argv) string inputfile; bool antialiasing; bool redirectConsole; - auto helpInformation = getopt(argv, "redirect-console", &redirectConsole, "no-direct-mode", &nodirectmode, "file", &inputfile, "anti-aliasing", "Enable antialiasing.", &antialiasing); + int hardware = -1; + auto helpInformation = getopt(argv, "redirect-console", &redirectConsole, "no-direct-mode", &nodirectmode, "file", &inputfile, "anti-aliasing", "Enable antialiasing.", &antialiasing, + "hardware", &hardware); if (helpInformation.helpWanted) { defaultGetoptPrinter("Some information about the program.", @@ -23,6 +25,8 @@ int main(string[] argv) //try { auto pc = new PetitComputer(); + if (hardware != -1) + pc.hardware = cast(Hardware)hardware; pc.run(nodirectmode, inputfile, antialiasing, redirectConsole); } /*(Throwable t)