Fix Hue+ initialization on Windows

master
Adam Honse 6 years ago
parent f76bf34d8d
commit 5f786e649a

@ -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() */

Loading…
Cancel
Save