Add cli.cpp and make it build at least

Not confirmed working as of yet, but at least it builds and
--list-devices works.

Code originally taken from Sam Lewis (@sam-masaki on gitlab.com), see:
https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/9
This commit is contained in:
Stefan Reiter
2020-02-21 23:47:10 +01:00
committed by Adam Honse
parent 3c6ac31eab
commit 71c650cd45
3 changed files with 347 additions and 0 deletions

View File

@@ -19,6 +19,9 @@
extern std::vector<i2c_smbus_interface*> busses;
extern std::vector<RGBController*> rgb_controllers;
// See cli.cpp
extern int cli_main(int argc, char *argv[]);
/******************************************************************************************\
* *
* main *
@@ -29,6 +32,11 @@ extern std::vector<RGBController*> rgb_controllers;
int main(int argc, char* argv[])
{
if (argc > 1 && strcmp(argv[1], "--gui"))
{
return cli_main(argc, argv);
}
DetectRGBControllers();
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);