Update SteelSeriesRivalController files to new standardized header format
This commit is contained in:
parent
6d0c990834
commit
a4a457ad5c
4 changed files with 48 additions and 41 deletions
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_SteelSeriesRival.cpp |
|
||||
| |
|
||||
| Generic RGB Interface SteelSeriesRival |
|
||||
| Class |
|
||||
| |
|
||||
| B Horn (bahorn) 13/05/2020 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_SteelSeriesRival.cpp |
|
||||
| |
|
||||
| RGBController for SteelSeries Rival |
|
||||
| |
|
||||
| B Horn (bahorn) 13 May 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_SteelSeriesRival.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_SteelSeriesRival.h |
|
||||
| |
|
||||
| Generic RGB Interface SteelSeriesRival |
|
||||
| Class |
|
||||
| |
|
||||
| B Horn (bahorn) 13/05/2020 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_SteelSeriesRival.h |
|
||||
| |
|
||||
| RGBController for SteelSeries Rival |
|
||||
| |
|
||||
| B Horn (bahorn) 13 May 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,32 @@
|
|||
/*-----------------------------------------*\
|
||||
| SteelSeriesRivalController.h |
|
||||
| |
|
||||
| Definitions and types for SteelSeries |
|
||||
| Rival lighting controller |
|
||||
| |
|
||||
| B Horn (bahorn) 13/5/2020 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| SteelSeriesRivalController.cpp |
|
||||
| |
|
||||
| Driver for SteelSeries Rival |
|
||||
| |
|
||||
| B Horn (bahorn) 13 May 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "SteelSeriesRivalController.h"
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdint>
|
||||
#include "SteelSeriesRivalController.h"
|
||||
|
||||
static void send_usb_msg(hid_device* dev, char * data_pkt, unsigned int size)
|
||||
{
|
||||
char* usb_pkt = new char[size + 1];
|
||||
|
||||
|
||||
usb_pkt[0] = 0x00;
|
||||
for(unsigned int i = 1; i < size + 1; i++)
|
||||
{
|
||||
usb_pkt[i] = data_pkt[i-1];
|
||||
}
|
||||
|
||||
|
||||
hid_write(dev, (unsigned char *)usb_pkt, size + 1);
|
||||
|
||||
|
||||
delete[] usb_pkt;
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +61,7 @@ std::string SteelSeriesRivalController::GetSerialString()
|
|||
{
|
||||
wchar_t serial_string[128];
|
||||
int ret = hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
|
||||
if (ret != 0)
|
||||
{
|
||||
return("");
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
/*-----------------------------------------*\
|
||||
| SteelSeriesRivalController.h |
|
||||
| |
|
||||
| Definitions and types for SteelSeries |
|
||||
| Rival lighting controller |
|
||||
| |
|
||||
| B Horn (bahorn) 13/5/2020 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| SteelSeriesRivalController.h |
|
||||
| |
|
||||
| Driver for SteelSeries Rival |
|
||||
| |
|
||||
| B Horn (bahorn) 13 May 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#include "SteelSeriesGeneric.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Mode, we then use these to set actual effect based on speed. */
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue