Skip to content

Commit db517c0

Browse files
committed
Support AE-5 and AE-5 Plus on Windows
1 parent 3fb56e6 commit db517c0

6 files changed

Lines changed: 794 additions & 0 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*---------------------------------------------------------*\
2+
| CreativeSoundBlasterAE5ControllerBase.h |
3+
| |
4+
| Base interface for Creative SoundBlaster AE-5 |
5+
| |
6+
| This file is part of the OpenRGB project |
7+
| SPDX-License-Identifier: GPL-2.0-or-later |
8+
\*---------------------------------------------------------*/
9+
10+
#pragma once
11+
12+
#include <string>
13+
14+
class CreativeSoundBlasterAE5ControllerBase
15+
{
16+
public:
17+
virtual ~CreativeSoundBlasterAE5ControllerBase() = default;
18+
19+
virtual bool Initialize() = 0;
20+
virtual std::string GetDeviceLocation() = 0;
21+
virtual std::string GetDeviceName() = 0;
22+
virtual unsigned int GetLEDCount() = 0;
23+
virtual unsigned int GetExternalLEDCount() = 0;
24+
virtual void SetExternalLEDCount(unsigned int count) = 0;
25+
26+
virtual void SetLEDColors(unsigned char led_count, unsigned char* red_values,
27+
unsigned char* green_values, unsigned char* blue_values) = 0;
28+
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*---------------------------------------------------------*\
2+
| CreativeSoundBlasterAE5ControllerDetect_Windows.cpp |
3+
| |
4+
| Detector for Creative SoundBlaster AE-5 (Windows) |
5+
| |
6+
| This file is part of the OpenRGB project |
7+
| SPDX-License-Identifier: GPL-2.0-or-later |
8+
\*---------------------------------------------------------*/
9+
10+
#include "Detector.h"
11+
#include "CreativeSoundBlasterAE5Controller_Windows.h"
12+
#include "RGBController_CreativeSoundBlasterAE5_Windows.h"
13+
#include "LogManager.h"
14+
15+
void DetectCreativeAE5Device()
16+
{
17+
LOG_INFO("[Creative SoundBlaster AE-5] Windows detection function called");
18+
19+
CreativeSoundBlasterAE5Controller_Windows* controller = new CreativeSoundBlasterAE5Controller_Windows();
20+
21+
if(controller->Initialize())
22+
{
23+
LOG_INFO("[Creative SoundBlaster AE-5] Device initialized successfully, registering controller");
24+
RGBController_CreativeSoundBlasterAE5* rgb_controller = new RGBController_CreativeSoundBlasterAE5(controller);
25+
ResourceManager::get()->RegisterRGBController(rgb_controller);
26+
}
27+
else
28+
{
29+
LOG_WARNING("[Creative SoundBlaster AE-5] Device initialization failed");
30+
delete controller;
31+
}
32+
}
33+
34+
REGISTER_DETECTOR("Creative SoundBlaster AE-5", DetectCreativeAE5Device);

0 commit comments

Comments
 (0)