public static XINPUT_GAMEPAD_STATE get_gamepad_state(int user_index) { _oldState = _lastState; _get_gamepad_state(user_index, out _lastState); // Console.WriteLine(Convert.ToString(_lastState.wButtons, 2).PadLeft(16, '0')); return(_lastState); }
private static extern int _get_gamepad_state(int user_index, out XINPUT_GAMEPAD_STATE struc);