|
7 | 7 | using namespace std; |
8 | 8 |
|
9 | 9 | bool opt_verbose = false; |
10 | | -bool opt_fixedAltColorPath = false; |
11 | | -bool opt_fixedPupPath = false; |
12 | 10 | static volatile bool running = true; |
13 | 11 |
|
14 | 12 | static struct cag_option options[] = { |
@@ -97,12 +95,10 @@ int main(int argc, char* argv[]) |
97 | 95 | else if (identifier == 'o') |
98 | 96 | { |
99 | 97 | pConfig->SetAltColorPath(cag_option_get_value(&cag_context)); |
100 | | - opt_fixedAltColorPath = true; |
101 | 98 | } |
102 | 99 | else if (identifier == 'u') |
103 | 100 | { |
104 | 101 | pConfig->SetPUPVideosPath(cag_option_get_value(&cag_context)); |
105 | | - opt_fixedPupPath = true; |
106 | 102 | } |
107 | 103 | else if (identifier == 'a') |
108 | 104 | { |
@@ -155,13 +151,9 @@ int main(int argc, char* argv[]) |
155 | 151 | } |
156 | 152 |
|
157 | 153 | std::string altColorPath = DMDUtil::Config::GetInstance()->GetAltColorPath(); |
158 | | - if (!altColorPath.empty()) |
159 | | - { |
160 | | - pDmd->SetAltColorPath(altColorPath.c_str()); |
161 | | - opt_fixedAltColorPath = true; |
162 | | - } |
| 154 | + std::string pupVideosPath = DMDUtil::Config::GetInstance()->GetPUPVideosPath(); |
163 | 155 |
|
164 | | - DMDUtil::DMDServer server(pDmd, opt_fixedAltColorPath, opt_fixedPupPath); |
| 156 | + DMDUtil::DMDServer server(pDmd, !altColorPath.empty(), !pupVideosPath.empty()); |
165 | 157 |
|
166 | 158 | if (!server.Start(pConfig->GetDMDServerAddr(), pConfig->GetDMDServerPort())) |
167 | 159 | { |
|
0 commit comments