Add option to save configuration on exit.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2017-06-29 21:02:14 +01:00
parent c9a6d7688e
commit 91678645a7
2 changed files with 6 additions and 5 deletions

View file

@ -1,8 +1,5 @@
[Configuration]
Apple2 Type=16
Apple2 Type=17
Printer Filename=Printer.txt
Emulation Speed=10
CPU Type=1
[Preferences]
Last Disk Image 1=/home/andrea/projects/cvs/A2E/ANDREA.DSK

View file

@ -35,6 +35,7 @@ namespace
std::string snapshot;
int memclear;
bool benchmark;
bool saveConfigurationOnExit;
bool run; // false if options include "-h"
};
@ -43,7 +44,8 @@ namespace
{
po::options_description desc("AppleWin ncurses");
desc.add_options()
("help,h", "Print this help message");
("help,h", "Print this help message")
("conf", "Save configuration on exit");
po::options_description diskDesc("Disk");
diskDesc.add_options()
@ -78,6 +80,8 @@ namespace
return false;
}
options.saveConfigurationOnExit = vm.count("conf");
if (vm.count("d1"))
{
options.disk1 = vm["d1"].as<std::string>();