Slight rework so that config can have a base dir but the program can start in another one.
This commit is contained in:
parent
d1c2352237
commit
3d4ddde96e
8 changed files with 32 additions and 13 deletions
6
main.cpp
6
main.cpp
|
@ -1,5 +1,6 @@
|
|||
#include "builder.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "config.hpp"
|
||||
#include <fmt/core.h>
|
||||
#include "sound.hpp"
|
||||
#include "textures.hpp"
|
||||
|
@ -11,12 +12,15 @@ int main(int argc, char *argv[])
|
|||
int opt = 0;
|
||||
int timer_seconds = 60 * 60;
|
||||
|
||||
while((opt = getopt(argc, argv, "-t:")) != -1) {
|
||||
while((opt = getopt(argc, argv, "t:c:")) != -1) {
|
||||
switch(opt) {
|
||||
case 't':
|
||||
timer_seconds = atoi(optarg) * 60;
|
||||
fmt::println("Setting count down timer to {} seconds.", timer_seconds);
|
||||
break;
|
||||
case 'c':
|
||||
Config::set_base_dir(optarg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue