public unsafe SdlGamepad(SdlInputContext ctx, int currentIndex, int instanceId) { _ctx = ctx; InstanceId = instanceId; ActualIndex = currentIndex; VibrationMotors = new IMotor[] { new SdlMotor(0, this), new SdlMotor(1, this) }; _controller = ctx.Sdl.GameControllerOpen(currentIndex); }
public unsafe SdlJoystick(SdlInputContext ctx, int currentIndex, int instanceId) { _ctx = ctx; InstanceId = instanceId; ActualIndex = currentIndex; _joystick = _ctx.Sdl.JoystickOpen(currentIndex); _buttons = new Button[0]; // arrays will be sized appropriately later _axes = new Axis[0]; _hats = new Hat[0]; }
public SdlKeyboard(SdlInputContext ctx) { _ctx = ctx; }
public SdlMouse(SdlInputContext ctx) { _ctx = ctx; Cursor = new SdlCursor(this, ctx); }
internal unsafe SdlCursor(SdlMouse mouse, SdlInputContext ctx) { _mouse = mouse; _ctx = ctx; }