<commit_before>#include "JoystickController.h"
#include "GameSystems.h"
#include <GLFW/glfw3.h>
#include "package\imgui.h"
 
using namespace Input;
using namespace Input::Joystick;
 

Input::InputInfo Input::Joystick::JoystickController::Poll()
{
	InputInfo result;
	int buttonCount = 0;
	auto glfwButtons = glfwGetJoystickButtons	(hardwareID, &buttonCount);
	//take the smaller of the two button arrays so we dont go out of bounds
	int buttonIterations = JOYSTICK_HARDWARE_BUTTON_MAX < buttonCount ? JOYSTICK_HARDWARE_BUTTON_MAX : buttonCount;
	

	//process buttons to get virutal key return
	for (int i = 0; i < buttonIterations; ++i)
	{ 
		 //logic here
	}


	//copy buttons to last frame buttons
	for (int i = 0; i < buttonIterations; ++i)
	{
		lastFrameHardwareButtons[i] = glfwButtons[i];
	}


	return result;
}
 <commit_msg>final joystick commit for the night<commit_after>#include "JoystickController.h"
#include "GameSystems.h"
#include <GLFW/glfw3.h>
#include "package\imgui.h"
 
using namespace Input;
using namespace Input::Joystick;
 

Input::InputInfo Input::Joystick::JoystickController::Poll()
{
	InputInfo result;
	int buttonCount = 0;
	auto glfwButtons = glfwGetJoystickButtons	(hardwareID, &buttonCount);
	//take the smaller of the two button arrays so we dont go out of bounds
	int buttonIterations = JOYSTICK_HARDWARE_BUTTON_MAX < buttonCount ? JOYSTICK_HARDWARE_BUTTON_MAX : buttonCount;
	buttonIterations = buttonIterations < FINAL_VIRTUAL_KEY_ENUM_VALUE ? buttonIterations : FINAL_VIRTUAL_KEY_ENUM_VALUE;
	 
	//process buttons to get virutal key return
	for (int i = 0; i < buttonIterations; ++i)
	{ 
		 //logic here
		if (lastFrameHardwareButtons[i] == GLFW_PRESS && glfwButtons[i] == GLFW_RELEASE)
		{
			result.inputMapping[i] = VIRTUAL_KEY_RELEASED;
		}
		else if (lastFrameHardwareButtons[i] == GLFW_RELEASE && glfwButtons[i] == GLFW_PRESS)
		{
			result.inputMapping[i] = VIRTUAL_KEY_PRESSED;
		}
		else if (lastFrameHardwareButtons[i] == GLFW_PRESS && glfwButtons[i] == GLFW_PRESS)
		{
			result.inputMapping[i] = VIRTUAL_KEY_DOWN;
		}
		else if (lastFrameHardwareButtons[i] == GLFW_PRESS && glfwButtons[i] == GLFW_PRESS)
		{
			result.inputMapping[i] = VIRTUAL_KEY_UP;
		}
	} 
	//copy buttons to last frame buttons
	for (int i = 0; i < buttonIterations; ++i)
	{
		lastFrameHardwareButtons[i] = glfwButtons[i];
	}


	return result;
}
 
{'fraction_non_alphanumeric': 0.10693153000845308, 'fraction_numerical': 0.0033812341504649195, 'mean_word_length': 4.947236180904523, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3615732', 'n_tokens_mistral': 901, 'n_tokens_neox': 849, 'n_words': 201}