<commit_before>#include <hydra/io/input.hpp>
#include <SDL2/SDL.h>
#include <hydra/engine.hpp>

Input::Input() {
	_kbState = SDL_GetKeyboardState(&_keyCount);
	_lockMouseCenter = false;
}

Input::~Input() {

}

void Input::setWindowSize(int x, int y) {
	_sizeX = x;
	_sizeY = y;
}

void Input::update(){
	auto& engine = Hydra::IEngine::getInstance();
	
	int x, y;
	int buttonState = SDL_GetMouseState(&x, &y);

	if (getKey(SDL_SCANCODE_L))
		_lockMouseCenter = true;

	if (_lockMouseCenter) {
		SDL_WarpMouseInWindow(NULL, _sizeX / 2, _sizeY / 2);
		_xyDiff = glm::ivec2(_sizeX / 2 - x, _sizeY / 2 - y);

		SDL_ShowCursor(false);
	}
	//else
		//SDL_ShowCursor(true);
		
}<commit_msg>Fixed some stupid code, again<commit_after>#include <hydra/io/input.hpp>
#include <SDL2/SDL.h>
#include <hydra/engine.hpp>

Input::Input() {
	_kbState = SDL_GetKeyboardState(&_keyCount);
	_lockMouseCenter = false;
}

Input::~Input() {

}

void Input::setWindowSize(int x, int y) {
	_sizeX = x;
	_sizeY = y;
}

void Input::update(){
	int x, y;
	/*int buttonState = */SDL_GetMouseState(&x, &y);

	if (getKey(SDL_SCANCODE_L))
		_lockMouseCenter = true;

	if (_lockMouseCenter) {
		SDL_WarpMouseInWindow(NULL, _sizeX / 2, _sizeY / 2);
		_xyDiff = glm::ivec2(_sizeX / 2 - x, _sizeY / 2 - y);

		SDL_ShowCursor(false);
	}
	//else
		//SDL_ShowCursor(true);
}
{'fraction_non_alphanumeric': 0.16491754122938532, 'fraction_numerical': 0.008995502248875561, 'mean_word_length': 4.318725099601593, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4488917', 'n_tokens_mistral': 596, 'n_tokens_neox': 553, 'n_words': 109}