Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic Force Added - For Engine Vibration or Similar Effect #19

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions DirectInputExplorer~/DirectInputExplorer/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using DirectInputManager;
Expand Down Expand Up @@ -90,7 +91,14 @@ private void FFB_CheckBox_CheckedChanged(object sender, EventArgs e) {
FFBEffects TriggeringEffectType = (FFBEffects)Enum.Parse(typeof(FFBEffects), TriggeringCheckBox.Tag.ToString());

if (TriggeringCheckBox.Checked) { // Enable the effect
TriggeringCheckBox.Checked = DIManager.EnableFFBEffect(DIManager.devices[ComboBoxDevices.SelectedIndex], TriggeringEffectType); // If enable fails, checkbox will be unchecked

if (TriggeringEffectType == FFBEffects.Inertia)
{
Debug.Write("PRINT BUMP");
DIManager.EnablePeroidicFFBEffect(DIManager.devices[ComboBoxDevices.SelectedIndex], FFBEffects.ConstantForce);
}
else
TriggeringCheckBox.Checked = DIManager.EnableFFBEffect(DIManager.devices[ComboBoxDevices.SelectedIndex], TriggeringEffectType); // If enable fails, checkbox will be unchecked
} else { // Disable the effect
TriggeringCheckBox.Checked = !DIManager.DestroyFFBEffect(DIManager.devices[ComboBoxDevices.SelectedIndex], TriggeringEffectType);
}
Expand Down Expand Up @@ -159,7 +167,7 @@ private void FFB_UpDown_ValueChanged(object sender, EventArgs e) {
DIManager.UpdateFrictionSimple(ActiveDevice, (int)((TrigElement.Parent.Controls.Find("UDFrictionMagnitude", false).FirstOrDefault() as NumericUpDown).Value));
break;
case "Inertia":
DIManager.UpdateInertiaSimple(ActiveDevice, (int)((TrigElement.Parent.Controls.Find("UDInertiaMagnitude", false).FirstOrDefault() as NumericUpDown).Value));
DIManager.UpdatePeroidEffect(ActiveDevice, FFBEffects.ConstantForce,(int)((TrigElement.Parent.Controls.Find("UDInertiaMagnitude", false).FirstOrDefault() as NumericUpDown).Value));
break;
default:
break;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\Ducky\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Ducky\\.nuget\\packages"
"C:\\Users\\drathod\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\drathod\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = DirectInputExplorer
build_property.ProjectDir = C:\Users\Ducky\Documents\GitHub\Unity-DirectInput\DirectInputExplorer~\DirectInputExplorer\
build_property.ProjectDir = C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,54 @@ C:\Users\Ducky\Documents\GitHub\Unity-DirectInput\DirectInputExplorer~\DirectInp
C:\Users\Ducky\Documents\GitHub\Unity-DirectInput\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.pdb
C:\Users\Ducky\Documents\GitHub\Unity-DirectInput\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.genruntimeconfig.cache
C:\Users\Ducky\Documents\GitHub\Unity-DirectInput\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\ref\DirectInputExplorer.dll
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.exe
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.deps.json
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.json
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.dev.json
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.dll
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.pdb
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.Form1.resources
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.GenerateResource.cache
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.GeneratedMSBuildEditorConfig.editorconfig
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfoInputs.cache
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfo.cs
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.CoreCompileInputs.cache
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.dll
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\refint\DirectInputExplorer.dll
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.pdb
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.genruntimeconfig.cache
E:\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\ref\DirectInputExplorer.dll
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.exe
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.deps.json
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.json
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.dev.json
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.dll
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.pdb
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.Form1.resources
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.GenerateResource.cache
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfoInputs.cache
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfo.cs
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.CoreCompileInputs.cache
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.dll
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\refint\DirectInputExplorer.dll
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.pdb
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.genruntimeconfig.cache
C:\Users\dhruv.000\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\ref\DirectInputExplorer.dll
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.exe
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.deps.json
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.json
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.runtimeconfig.dev.json
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.dll
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\bin\Debug\net5.0-windows\DirectInputExplorer.pdb
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.Form1.resources
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.GenerateResource.cache
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfoInputs.cache
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.AssemblyInfo.cs
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.csproj.CoreCompileInputs.cache
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.dll
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\refint\DirectInputExplorer.dll
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.pdb
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\DirectInputExplorer.genruntimeconfig.cache
C:\Users\drathod\Downloads\Unity-DirectInput-main\Unity-DirectInput-main\Unity-DirectInput-main\DirectInputExplorer~\DirectInputExplorer\obj\Debug\net5.0-windows\ref\DirectInputExplorer.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"format": 1,
"restore": {
"C:\\Users\\Ducky\\Documents\\GitHub\\Unity-DirectInput\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj": {}
"C:\\Users\\drathod\\Downloads\\Unity-DirectInput-main\\Unity-DirectInput-main\\Unity-DirectInput-main\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj": {}
},
"projects": {
"C:\\Users\\Ducky\\Documents\\GitHub\\Unity-DirectInput\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj": {
"C:\\Users\\drathod\\Downloads\\Unity-DirectInput-main\\Unity-DirectInput-main\\Unity-DirectInput-main\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Ducky\\Documents\\GitHub\\Unity-DirectInput\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj",
"projectUniqueName": "C:\\Users\\drathod\\Downloads\\Unity-DirectInput-main\\Unity-DirectInput-main\\Unity-DirectInput-main\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj",
"projectName": "DirectInputExplorer",
"projectPath": "C:\\Users\\Ducky\\Documents\\GitHub\\Unity-DirectInput\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj",
"packagesPath": "C:\\Users\\Ducky\\.nuget\\packages\\",
"outputPath": "C:\\Users\\Ducky\\Documents\\GitHub\\Unity-DirectInput\\DirectInputExplorer~\\DirectInputExplorer\\obj\\",
"projectPath": "C:\\Users\\drathod\\Downloads\\Unity-DirectInput-main\\Unity-DirectInput-main\\Unity-DirectInput-main\\DirectInputExplorer~\\DirectInputExplorer\\DirectInputExplorer.csproj",
"packagesPath": "C:\\Users\\drathod\\.nuget\\packages\\",
"outputPath": "C:\\Users\\drathod\\Downloads\\Unity-DirectInput-main\\Unity-DirectInput-main\\Unity-DirectInput-main\\DirectInputExplorer~\\DirectInputExplorer\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\Ducky\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Users\\drathod\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net5.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
Expand Down Expand Up @@ -51,9 +56,21 @@
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[5.0.0, 5.0.0]"
},
{
"name": "Microsoft.NETCore.App.Host.win-x64",
"version": "[5.0.17, 5.0.17]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[5.0.0, 5.0.0]"
},
{
"name": "Microsoft.WindowsDesktop.App.Ref",
"version": "[5.0.0, 5.0.0]"
}
],
"frameworkReferences": {
Expand All @@ -64,7 +81,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.100\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.300\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Ducky\.nuget\packages\</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\drathod\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.4.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.9.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Ducky\.nuget\packages\" />
<SourceRoot Include="C:\Users\drathod\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
Loading