Creative Sound BlasterX G6 support
Commits squashed and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
a300e80f47
commit
b32ef76121
6 changed files with 243 additions and 0 deletions
30
Controllers/CreativeController/CreativeControllerDetect.cpp
Normal file
30
Controllers/CreativeController/CreativeControllerDetect.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "CreativeSoundBlasterXG6Controller.h"
|
||||
#include "RGBController_CreativeSoundBlasterXG6.h"
|
||||
#include "Detector.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Creative vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CREATIVE_VID 0x041E
|
||||
/*-----------------------------------------------------*\
|
||||
| SoundCards |
|
||||
\*-----------------------------------------------------*/
|
||||
#define CREATIVE_SOUNDBLASTERX_G6_PID 0x3256
|
||||
|
||||
void DetectCreativeDevice(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
CreativeSoundBlasterXG6Controller* controller = new CreativeSoundBlasterXG6Controller(dev, info->path);
|
||||
RGBController_CreativeSoundBlasterXG6* rgb_controller = new RGBController_CreativeSoundBlasterXG6(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*\
|
||||
| Sound Cards |
|
||||
\*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
REGISTER_HID_DETECTOR_I("Creative SoundBlasterX G6", DetectCreativeDevice, CREATIVE_VID, CREATIVE_SOUNDBLASTERX_G6_PID, 4);
|
||||
Loading…
Add table
Add a link
Reference in a new issue