using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using SharpDX;
using SharpDX.DirectInput;
namespace Ps4_Controller
{
public partial class Form1 : Form
{
DirectInput input = new DirectInput();
Joystick stick;
public Form1()
{
InitializeComponent();
stick = ListJoysticks()[0];
}
private Joystick[] ListJoysticks()
{
List<Joystick> sticks = new List<Joystick>();
foreach (DeviceInstance device in input.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly))
{
Joystick stick = new Joystick(input, device.InstanceGuid);
stick.Acquire();
foreach (DeviceObjectInstance deviceObject in stick.GetObjects(DeviceObjectTypeFlags.Axis))
{
stick.GetObjectPropertiesById(deviceObject.ObjectId).Range = new InputRange(-100, 100);
}
sticks.Add(stick);
}
return sticks.ToArray();
}
private void HandleJoystick()
{
Joystick stick = ListJoysticks()[0];
int[] axis = new int[0];
foreach (DeviceObjectInstance doi in stick.GetObjects())
{
axis = new int[axis.Length + 1];
axis[axis.Length - 1] = doi.Offset;
}
EffectParameters ep = new EffectParameters();
DeviceInstance stick1 = new DeviceInstance();
Effect effect = new Effect(stick.);
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user