JoystickActivityArgs(Joystick aStick, JoystickInfoExtra aJoyInfo, float threshold, float offset) { fStick = aStick; fStickInfo = aJoyInfo; fThreshold = threshold; fOffset = offset; }
public static JoystickActivityArgs Create(Joystick aStick, float threshold, float offset) { JoystickInfoExtra fStickInfo; fStickInfo = new JoystickInfoExtra(); fStickInfo.dwSize = System.Runtime.InteropServices.Marshal.SizeOf(fStickInfo); fStickInfo.dwFlags = winmm.JOY_RETURNALL; winmm.joyGetPosEx(aStick.ID, ref fStickInfo); JoystickActivityArgs newState = new JoystickActivityArgs(aStick, fStickInfo, threshold, offset); return newState; }
public static extern int joyGetPosEx(int uJoyID, ref JoystickInfoExtra pji);