Fix Hue+ initialization on Windows

This commit is contained in:
Adam Honse 2019-12-23 15:37:15 -06:00
parent f76bf34d8d
commit 5f786e649a

View file

@ -37,7 +37,6 @@ void DetectHuePlusControllers(std::vector<RGBController*> &rgb_controllers)
#ifdef WIN32
GetModuleFileName(NULL, filename, 2048);
strcpy(filename, std::string(filename).substr(0, std::string(filename).find_last_of("\\/")).c_str());
strcat(filename, "\\settings.txt");
#else
snprintf(arg1, 64, "/proc/%d/exe", getpid());
readlink(arg1, filename, 1024);
@ -86,4 +85,4 @@ void DetectHuePlusControllers(std::vector<RGBController*> &rgb_controllers)
}
} /* DetectHuePlusControllers() */
} /* DetectHuePlusControllers() */