1 #pragma once
2 
3 #include <SimpleIni.h>
4 
5 #include "common/util.h"
6 
7 // Config Manager, both CLI parsing and INI parse/save
8 struct Config {
9 private:
10   CSimpleIniA ini;
11   char filename [260];
12 public:
13   Config();
14   void load(int argc, char* argv[]);
15   void save();
16 
17 public:
18   /*----------  INI Config Args (saved)  ----------*/
19   // UI
20   uint window_scale = 2;
21   // Paths
22   char roms_dir [260] = { '.', '\0' };
23   // I _would_ write  `char roms_dir [260] = "."`, but I can't.
24   // Why? g++4 has a compiler bug, and Travis fails with that _valid_ syntax.
25 
26   /*----------  CLI Args (not saved)  ----------*/
27   struct {
28     bool log_cpu = false;
29     bool no_sav  = false;
30     bool ppu_timing_hack = false;
31 
32     bool ppu_debug = false;
33     bool widenes = false;
34 
35     std::string record_fm2_path;
36     std::string replay_fm2_path;
37 
38     std::string config_file;
39 
40     std::string rom;
41   } cli;
42 };
43