|
9 | 9 | #include "DMDUtil/DMDUtil.h" |
10 | 10 | #include "Logger.h" |
11 | 11 | #include "cargs.h" |
12 | | -#include "ini.h" |
13 | 12 | #include "sockpp/tcp_acceptor.h" |
14 | 13 |
|
15 | 14 | #define DMDSERVER_MAX_WIDTH 256 |
@@ -271,26 +270,7 @@ int main(int argc, char* argv[]) |
271 | 270 | char identifier = cag_option_get_identifier(&cag_context); |
272 | 271 | if (identifier == 'c') |
273 | 272 | { |
274 | | - inih::INIReader r{cag_option_get_value(&cag_context)}; |
275 | | - pConfig->SetDMDServerAddr(r.Get<string>("DMDServer", "Addr", "localhost").c_str()); |
276 | | - pConfig->SetDMDServerPort(r.Get<int>("DMDServer", "Port", 6789)); |
277 | | - pConfig->SetAltColor(r.Get<bool>("DMDServer", "AltColor", true)); |
278 | | - pConfig->SetAltColorPath(r.Get<string>("DMDServer", "AltColorPath", "").c_str()); |
279 | | - pConfig->SetPUPCapture(r.Get<bool>("DMDServer", "PUPCapture", false)); |
280 | | - pConfig->SetPUPVideosPath(r.Get<string>("DMDServer", "PUPVideosPath", "").c_str()); |
281 | | - pConfig->SetPUPExactColorMatch(r.Get<bool>("DMDServer", "PUPExactColorMatch", false)); |
282 | | - // ZeDMD |
283 | | - pConfig->SetZeDMD(r.Get<bool>("ZeDMD", "Enabled", true)); |
284 | | - pConfig->SetZeDMDDevice(r.Get<string>("ZeDMD", "Device", "").c_str()); |
285 | | - pConfig->SetZeDMDDebug(r.Get<bool>("ZeDMD", "Debug", false)); |
286 | | - pConfig->SetZeDMDBrightness(r.Get<int>("ZeDMD", "Brightness", -1)); |
287 | | - // ZeDMD WiFi |
288 | | - pConfig->SetZeDMDWiFiEnabled(r.Get<bool>("ZeDMD-WiFi", "Enabled", false)); |
289 | | - pConfig->SetZeDMDWiFiAddr(r.Get<string>("ZeDMD-WiFi", "WiFiAddr", "").c_str()); |
290 | | - // Pixelcade |
291 | | - pConfig->SetPixelcade(r.Get<bool>("Pixelcade", "Enabled", true)); |
292 | | - pConfig->SetPixelcadeDevice(r.Get<string>("Pixelcade", "Device", "").c_str()); |
293 | | - |
| 273 | + pConfig->parseConfigFile(cag_option_get_value(&cag_context)); |
294 | 274 | if (opt_verbose) DMDUtil::Log(DMDUtil_LogLevel_INFO, "Loaded config file"); |
295 | 275 | } |
296 | 276 | else if (identifier == 'o') |
|
0 commit comments