Moved joystick functions back and added struct to support os specific variables in the joystick class.