/// @desc Get gamepad and maintain a list through Async System events... Well, ungracefully.
function _gamepad_get(){
	if (!variable_global_exists("gamepads_list")) global.gamepads_list = [];
	if (async_load[? "event_type"] == "gamepad discovered")
	{
	    var _pad = async_load[? "pad_index"];
	    gamepad_set_axis_deadzone(_pad, 0.2);
	    array_push(global.gamepads_list, _pad);
	}
	else if (async_load[? "event_type"] == "gamepad lost")
	{
	    var _pad = async_load[? "pad_index"];
	    var _index = array_get_index(global.gamepads_list, _pad);
	    array_delete(global.gamepads_list, _index, 1);
	}
}
_gamepad_get()