Rewrite OpenRazer support to use static constant device mapping table instead of big switch/case. Add support for some extra Razer devices. Use "ledstrip.txt" for LED strip settings
This commit is contained in:
parent
68b0dc9e2e
commit
557c9df9a0
4 changed files with 973 additions and 548 deletions
|
|
@ -37,12 +37,12 @@ void DetectLEDStripControllers(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");
|
||||
strcat(filename, "\\ledstrip.txt");
|
||||
#else
|
||||
snprintf(arg1, 64, "/proc/%d/exe", getpid());
|
||||
readlink(arg1, filename, 1024);
|
||||
strcpy(filename, std::string(filename).substr(0, std::string(filename).find_last_of("\\/")).c_str());
|
||||
strcat(filename, "/settings.txt");
|
||||
strcat(filename, "/ledstrip.txt");
|
||||
#endif
|
||||
|
||||
//Open settings file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue