Slight rework so that config can have a base dir but the program can start in another one.

This commit is contained in:
Zed A. Shaw 2025-04-23 12:08:36 -04:00
parent d1c2352237
commit 3d4ddde96e
8 changed files with 32 additions and 13 deletions

View file

@ -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;
}
}