Refactoring of Input Devices
This commit is contained in:
26
openVulkanoCpp/Input/InputDeviceController.cpp
Normal file
26
openVulkanoCpp/Input/InputDeviceController.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "InputDeviceController.hpp"
|
||||
#include "Base/Logger.hpp"
|
||||
|
||||
namespace openVulkanoCpp::Input
|
||||
{
|
||||
void InputDeviceController::Init(const int index, const std::string& name)
|
||||
{
|
||||
InputDevice::Init(InputDeviceType::CONTROLLER, index, name);
|
||||
|
||||
pressedButtons = 0;
|
||||
lastPressedButtons = 0;
|
||||
for(float& axis : axes)
|
||||
{
|
||||
axis = 0;
|
||||
}
|
||||
|
||||
// TODO find controller type from name
|
||||
Logger::INPUT->info("Initialized controller: id: {0}, name: {1}", index, name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user