Skip to content

Instantly share code, notes, and snippets.

View Ryochan7's full-sized avatar

Travis Nickles Ryochan7

View GitHub Profile
@Ryochan7
Ryochan7 / make_win32_release_changes.diff
Created July 7, 2020 20:06
Changes to win32 release script to work with current MSYS2
diff --git a/make-win32-release.sh b/make-win32-release.sh
index 46082af1..fc1d3be5 100644
--- a/make-win32-release.sh
+++ b/make-win32-release.sh
@@ -9,9 +9,9 @@ GTK_LIBS=(libgtk-3-0.dll libgdk-3-0.dll libharfbuzz-0.dll libfreetype-6.dll
libglib-2.0-0.dll libgmodule-2.0-0.dll libgobject-2.0-0.dll
libpango-1.0-0.dll libpangocairo-1.0-0.dll libpangoft2-1.0-0.dll
libpangowin32-1.0-0.dll libpixman-1-0.dll zlib1.dll libexpat-1.dll
- libffi-6.dll libfribidi-0.dll libpcre-1.dll libthai-0.dll liblzma-5.dll
- librsvg-2-2.dll libcroco-0.6-3.dll libxml2-2.dll libdatrie-1.dll
@Ryochan7
Ryochan7 / Star Wars Racer.xml
Created February 14, 2020 23:02
DS4Windows profile for playing Star Wars Episode 1: Racer. Steering Wheel mode
<?xml version="1.0" encoding="utf-8"?>
<!-- DS4Windows Configuration Data. 01/30/2020 10:22:47 -->
<!-- Made with DS4Windows version 2.0.8 -->
<DS4Windows>
<flushHIDQueue>False</flushHIDQueue>
<touchToggle>True</touchToggle>
<idleDisconnectTimeout>0</idleDisconnectTimeout>
<Color>40,158,23</Color>
<RumbleBoost>100</RumbleBoost>
@Ryochan7
Ryochan7 / elder_scrolls_oblivion.gamecontroller.xml
Created August 13, 2019 00:15
Elder Scrolls 4 Oblivion profile to use with antimicro
<?xml version="1.0" encoding="UTF-8"?>
<gamecontroller configversion="6" appversion="2.0">
<!--The SDL name for a joystick is included for informational purposes only.-->
<sdlname>X360 Controller</sdlname>
<names/>
<sets>
<set index="1">
<stick index="1">
<deadZone>8000</deadZone>
<maxZone>32000</maxZone>
@Ryochan7
Ryochan7 / vigemclient_overlap_test.diff
Last active February 17, 2021 08:50
Use multiple overlapped structs to queue notify messages
diff --git a/src/ViGEmClient.cpp b/src/ViGEmClient.cpp
index e1bf4d6..a67b33f 100644
--- a/src/ViGEmClient.cpp
+++ b/src/ViGEmClient.cpp
@@ -73,6 +73,82 @@ typedef BOOL(WINAPI *MINIDUMPWRITEDUMP)(
LONG WINAPI vigem_internal_exception_handler(struct _EXCEPTION_POINTERS* apExceptionInfo);
#endif
+//
+// DeviceIOControl request notification handler classes for X360 and DS4 controller types.
@Ryochan7
Ryochan7 / skipvirtualds4.diff
Created March 24, 2019 06:38
Patch for DS4Windows to skip grabbing virtual DS4 controllers. Will be needed if DS4 emulation gets integrated
diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs
index f5ccddc..c4111ef 100644
--- a/DS4Windows/DS4Control/ScpUtil.cs
+++ b/DS4Windows/DS4Control/ScpUtil.cs
@@ -334,6 +334,34 @@ namespace DS4Windows
return result;
}
+ internal static string GetDeviceProperty(string deviceInstanceId,
+ NativeMethods.DEVPROPKEY prop)
@Ryochan7
Ryochan7 / squaresticktestds4.diff
Last active February 12, 2019 02:27
Square stick output option for DS4Windows
diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs
index 29a0bcd..e8158b3 100644
--- a/DS4Windows/DS4Control/Mapping.cs
+++ b/DS4Windows/DS4Control/Mapping.cs
@@ -75,6 +75,74 @@ namespace DS4Windows
new Queue<ControlToXInput>(), new Queue<ControlToXInput>()
};
+ struct DS4Vector2
+ {
@Ryochan7
Ryochan7 / 360steeringchange.diff
Created February 11, 2019 17:35
Proposed changes to DS4Windows 360 steering that change performance
diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs
index 7af90bd..cd82824 100644
--- a/DS4Windows/DS4Control/Mapping.cs
+++ b/DS4Windows/DS4Control/Mapping.cs
@@ -1579,11 +1579,16 @@ namespace DS4Windows
if (macroControl[24]) MappedState.RY = 0;
}
- if (getSASteeringWheelEmulationAxis(device) != SASteeringWheelEmulationAxisType.None)
+ if (GetSASteeringWheelEmulationAxis(device)
@Ryochan7
Ryochan7 / Tester.cs
Created September 29, 2018 07:10
Small sample of DS4WindowsAPI in action
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS4ImportTest
{
class Tester
{
@Ryochan7
Ryochan7 / testudpthread.diff
Created August 3, 2018 02:54
Current misadventures with the UDP server code
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index f2b19d5..80e7408 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -141,8 +141,43 @@ namespace DS4Windows
PreviousState[i] = new DS4State();
ExposedState[i] = new DS4StateExposed(CurrentState[i]);
}
+
+ boob = new ManualResetEvent(false);
@Ryochan7
Ryochan7 / ds4windows_deltastick_20180610.diff
Created June 10, 2018 22:15
Messy experimental DS4Windows version of delta acceleration for stick mouse
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index 3c4ff38..70a81b4 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -828,7 +828,11 @@ namespace DS4Windows
if (getEnableTouchToggle(ind))
CheckForTouchToggle(ind, cState, pState);
- cState = Mapping.SetCurveAndDeadzone(ind, cState, TempState[ind]);
+ cState = Mapping.SetCurveAndDeadzone(ind, cState, pState, TempState[ind]);