Skip to content

Commit

Permalink
Removed vJoy support + added successfully translating HID to vBox con…
Browse files Browse the repository at this point in the history
…troller
  • Loading branch information
Axadiw committed Dec 17, 2016
1 parent 0a9ed9a commit 9947eb0
Show file tree
Hide file tree
Showing 20 changed files with 1,964 additions and 382 deletions.
125 changes: 39 additions & 86 deletions MFIGamepadConfigCreator/ConfigCreator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.ObjectModel;
using MFIGamepadFeeder.Gamepads.Configuration;
using MFIGamepadShared.Configuration;
using vGenWrapper;

namespace MFIGamepadConfigCreator
{
Expand All @@ -12,147 +12,100 @@ public GamepadConfiguration GetNimbusConfiguration()
{
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = null,
Type = GamepadItemType.Empty
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = null,
Type = GamepadItemType.DPadUp
Type = GamepadItemType.DPad,
DPadType = XInputGamepadDPadButtons.DpadUp
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = null,
Type = GamepadItemType.DPadRight
Type = GamepadItemType.DPad,
DPadType = XInputGamepadDPadButtons.DpadRight
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = null,
Type = GamepadItemType.DPadDown
Type = GamepadItemType.DPad,
DPadType = XInputGamepadDPadButtons.DpadDown
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = null,
Type = GamepadItemType.DPadLeft
Type = GamepadItemType.DPad,
DPadType = XInputGamepadDPadButtons.DpadLeft
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 1,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.A
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 2,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.B
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 3,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.X
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 4,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.Y
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 5,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.LBumper
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 6,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.RBumper
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_SL0,
InvertAxis = false,
ConvertAxis = false,
TargetButtonId = null,
Type = GamepadItemType.Axis
Type = GamepadItemType.Axis,
AxisType = AxisType.LTrigger
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_SL1,
InvertAxis = false,
ConvertAxis = false,
TargetButtonId = null,
Type = GamepadItemType.Axis
Type = GamepadItemType.Axis,
AxisType = AxisType.RTrigger
},
new GamepadConfigurationItem
{
TargetUsage = null,
InvertAxis = null,
ConvertAxis = null,
TargetButtonId = 7,
Type = GamepadItemType.Button
Type = GamepadItemType.Button,
ButtonType = XInputGamepadButtons.Start
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_X,
Type = GamepadItemType.Axis,
AxisType = AxisType.Lx,
InvertAxis = false,
ConvertAxis = true,
TargetButtonId = null,
Type = GamepadItemType.Axis
ConvertAxis = true
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_Y,
Type = GamepadItemType.Axis,
AxisType = AxisType.Ly,
InvertAxis = true,
ConvertAxis = true,
TargetButtonId = null,
Type = GamepadItemType.Axis
ConvertAxis = true
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_RX,
Type = GamepadItemType.Axis,
AxisType = AxisType.Rx,
InvertAxis = false,
ConvertAxis = true,
TargetButtonId = null,
Type = GamepadItemType.Axis
ConvertAxis = true
},
new GamepadConfigurationItem
{
TargetUsage = HID_USAGES.HID_USAGE_RY,
Type = GamepadItemType.Axis,
AxisType = AxisType.Ry,
InvertAxis = true,
ConvertAxis = true,
TargetButtonId = null,
Type = GamepadItemType.Axis
ConvertAxis = true
}
};

Expand Down
23 changes: 6 additions & 17 deletions MFIGamepadConfigCreator/MFIGamepadConfigCreator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="HidSharp, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.1.5\lib\net35\HidSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
Expand Down Expand Up @@ -207,22 +203,15 @@
<Project>{35c01170-5735-4aac-bb97-aa52a735b5a5}</Project>
<Name>MFIGamepadShared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="vJoySDK\x64\vJoyInterface.dll" Condition="'$(Platform)' == 'x64'">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="vJoySDK\x86\vJoyInterface.dll" Condition="'$(Platform)' == 'x86'">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<ProjectReference Include="..\vGenWrapper\vGenWrapper.csproj">
<Project>{2E0670A9-6FE6-47B0-AD7A-E6C245522D8B}</Project>
<Name>vGenWrapper</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>MOVE /Y $(OutDir)\vJoySDK\$(PlatformName)\* $(OutDir)
MOVE /Y $(OutDir)\vGenSDK\$(PlatformName)\* $(OutDir)

rd /s /q "$(OutDir)\vJoySDK\"
rd /s /q "$(OutDir)\vGenSDK\"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 9947eb0

Please sign in to comment.