mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-05 21:57:53 -05:00
Removed duplicate GetKeyboardMappingLayoutType(int) declaration
* Refactored ValkyrieKeyboardController to fix pipeline
This commit is contained in:
@@ -1,19 +1,7 @@
|
||||
#include "Detector.h"
|
||||
#include "ValkyrieKeyboardController.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "Detector.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_ValkyrieKeyboard.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
ValkyrieKeyboardMappingLayoutType GetKeyboardMappingLayoutType(int interface)
|
||||
{
|
||||
switch(interface)
|
||||
{
|
||||
case 3:
|
||||
return PRO_LAYOUT;
|
||||
default:
|
||||
return NORMAL_LAYOUT;
|
||||
}
|
||||
}
|
||||
|
||||
void DetectValkyrieKeyboardControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
@@ -21,10 +9,9 @@ void DetectValkyrieKeyboardControllers(hid_device_info* info, const std::string&
|
||||
|
||||
if(dev)
|
||||
{
|
||||
ValkyrieKeyboardController* controller = new ValkyrieKeyboardController(dev, info->path, info->product_id, info->interface_number);
|
||||
ValkyrieKeyboardMappingLayoutType layout = GetKeyboardMappingLayoutType(info->interface_number);
|
||||
RGBController_ValkyrieKeyboard* rgb_controller = new RGBController_ValkyrieKeyboard(controller, layout);
|
||||
rgb_controller->name = name;
|
||||
ValkyrieKeyboardController* controller = new ValkyrieKeyboardController(dev, info->path, info->product_id, info->interface_number);
|
||||
RGBController_ValkyrieKeyboard* rgb_controller = new RGBController_ValkyrieKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user