/*
 * 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 OpenVulkano::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);
	}
}