driver: g-wolves full wireless support
This commit is contained in:
		@@ -2,17 +2,6 @@
 | 
			
		||||
 | 
			
		||||
static int send_command(libusb_device_handle* hand, uint8_t command, uint8_t size, void* report, bool wireless)
 | 
			
		||||
{
 | 
			
		||||
    if(wireless)
 | 
			
		||||
    {
 | 
			
		||||
        // If wireless, ask receiver for mouse command first
 | 
			
		||||
        struct REPORT_WIRELESS w_report = {0};
 | 
			
		||||
        int res = send_command(hand, COMMAND_WIRELESS_MOUSE, REPORT_WIRELESS_MOUSE_SIZE, &w_report, false);
 | 
			
		||||
        if(res <= 0) return res;
 | 
			
		||||
 | 
			
		||||
        if(!w_report.mouse_connected)
 | 
			
		||||
            return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    report_header_t* head = report;
 | 
			
		||||
    head->report_size = size;
 | 
			
		||||
    head->command = command;
 | 
			
		||||
@@ -31,6 +20,10 @@ static int send_command(libusb_device_handle* hand, uint8_t command, uint8_t siz
 | 
			
		||||
 | 
			
		||||
    if(res <= 0) return res;
 | 
			
		||||
 | 
			
		||||
    // Wait for mouse if necessary
 | 
			
		||||
    if(wireless)
 | 
			
		||||
        usleep(100000);
 | 
			
		||||
 | 
			
		||||
    // Get response report
 | 
			
		||||
    res = libusb_control_transfer(hand,
 | 
			
		||||
    0xa1, // request type
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user