Skip to content

Commit c7321ca

Browse files
committed
fixed paths from ini file
1 parent 55509ef commit c7321ca

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/server.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
using namespace std;
88

99
bool opt_verbose = false;
10-
bool opt_fixedAltColorPath = false;
11-
bool opt_fixedPupPath = false;
1210
static volatile bool running = true;
1311

1412
static struct cag_option options[] = {
@@ -97,12 +95,10 @@ int main(int argc, char* argv[])
9795
else if (identifier == 'o')
9896
{
9997
pConfig->SetAltColorPath(cag_option_get_value(&cag_context));
100-
opt_fixedAltColorPath = true;
10198
}
10299
else if (identifier == 'u')
103100
{
104101
pConfig->SetPUPVideosPath(cag_option_get_value(&cag_context));
105-
opt_fixedPupPath = true;
106102
}
107103
else if (identifier == 'a')
108104
{
@@ -155,13 +151,9 @@ int main(int argc, char* argv[])
155151
}
156152

157153
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();
163155

164-
DMDUtil::DMDServer server(pDmd, opt_fixedAltColorPath, opt_fixedPupPath);
156+
DMDUtil::DMDServer server(pDmd, !altColorPath.empty(), !pupVideosPath.empty());
165157

166158
if (!server.Start(pConfig->GetDMDServerAddr(), pConfig->GetDMDServerPort()))
167159
{

0 commit comments

Comments
 (0)