[ADD] Added report rate changing
Cannot confirm that working, tho
This commit is contained in:
13
main.cpp
13
main.cpp
@@ -3,8 +3,7 @@
|
||||
|
||||
int main() {
|
||||
Mouse m;
|
||||
int address, level, DPI_level;
|
||||
int default_dpi = 3200;
|
||||
int address, level, DPI_level, rate;
|
||||
m.init();
|
||||
do {
|
||||
m.listDevices();
|
||||
@@ -25,8 +24,14 @@ int main() {
|
||||
if(DPI_level < 100 || DPI_level > 4000) std::cout<<"Bad number. Try again!\n"<<std::endl;
|
||||
}while(DPI_level < 100 || DPI_level > 4000);
|
||||
|
||||
printf("Setting it to %d, boss!\n", DPI_level);
|
||||
int error = m.setDPI(DPI_level/100-1);
|
||||
do {
|
||||
std::cout << "Select Report Rate(in hz)(125, 250, 500): ";
|
||||
std::cin >> rate;
|
||||
if(rate !=125 & rate != 250 & rate != 500) std::cout<<"Bad number. Try again!\n"<<std::endl;
|
||||
}while(rate !=125 & rate != 250 & rate != 500);
|
||||
|
||||
printf("Setting it boss!\n");
|
||||
int error = m.setDPI((rate/125)-1, (DPI_level/100)-1); // rate: 125 = 0 250 = 1 500 = 3
|
||||
if(error != 0){
|
||||
std::cout<<"Sorry boss, i cant... err: "<<(int)error<<std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user