Skip to content

Instantly share code, notes, and snippets.

View Ryochan7's full-sized avatar

Travis Nickles Ryochan7

View GitHub Profile
@Ryochan7
Ryochan7 / ds4windows_vigem_udp_test_20180323.diff
Last active March 24, 2018 01:38
Patch for DS4Windows implementing ViGEm and UDP
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index e8a164c..7ae2ade 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -7,6 +7,9 @@ using System.Media;
using System.Threading.Tasks;
using static DS4Windows.Global;
using System.Threading;
+using Nefarius.ViGEm.Client;
+using Nefarius.ViGEm.Client.Targets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.ComponentModel;
namespace DS4Windows
{
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index e8a164c..833a4a6 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -39,6 +39,7 @@ namespace DS4Windows
};
public bool suspending;
//SoundPlayer sp = new SoundPlayer();
+ private UdpServer _udpServer;
@Ryochan7
Ryochan7 / ds4windows_vigem_20180322.diff
Last active March 22, 2018 23:43
ViGEm integration into DS4Windows
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index e8a164c..ae10895 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -7,6 +7,9 @@ using System.Media;
using System.Threading.Tasks;
using static DS4Windows.Global;
using System.Threading;
+using Nefarius.ViGEm.Client;
+using Nefarius.ViGEm.Client.Targets;
@Ryochan7
Ryochan7 / trackball_test_20180101.diff
Last active January 1, 2018 17:49
Testing trackball emulation with DS4 touchpad
diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs
index 14d1ea4..5215c3d 100644
--- a/DS4Windows/DS4Control/ControlService.cs
+++ b/DS4Windows/DS4Control/ControlService.cs
@@ -385,6 +385,7 @@ namespace DS4Windows
{
device.setIdleTimeout(getIdleDisconnectTimeout(ind));
device.setBTPollRate(getBTPollRate(ind));
+ touchPad[ind].ResetTrackAccel((int)getTrackballFriction(ind));
@Ryochan7
Ryochan7 / hidguardian_changes_20171103.diff
Created November 3, 2017 07:56
Some minor changes being tested for HidGuardian
diff --git a/Sys/HidGuardian/Device.c b/Sys/HidGuardian/Device.c
index 7f49c8c..8e17fdc 100644
--- a/Sys/HidGuardian/Device.c
+++ b/Sys/HidGuardian/Device.c
@@ -141,6 +141,7 @@ VOID EvtDeviceFileCreate(
WDF_REQUEST_SEND_OPTIONS options;
NTSTATUS status;
BOOLEAN ret;
+ WDF_REQUEST_PARAMETERS params;
@Ryochan7
Ryochan7 / ds4windows_1_4_92_gyrocalibtest.diff
Created September 10, 2017 18:23
Experimental Gyro Calibration for DS4Windows
diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs
index 82919d2..aaf38a6 100644
--- a/DS4Windows/DS4Library/DS4Device.cs
+++ b/DS4Windows/DS4Library/DS4Device.cs
@@ -441,6 +441,11 @@ namespace DS4Windows
touchpad = new DS4Touchpad();
sixAxis = new DS4SixAxis();
+
+ byte[] calibration = new byte[41];
@Ryochan7
Ryochan7 / dcnow-helper.py
Created July 6, 2017 09:11
Python module that makes using DCNow a little easier
#!/usr/bin/env python
import os
import sys
import time
import signal
import logging
# cd to directory containing upstream DreamPi source code
os.chdir("/home/ryochan7/Sources/dreampi/")
@Ryochan7
Ryochan7 / dnsmasq.conf
Created July 6, 2017 08:53
dnsmasq config file for dcnow use
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
@Ryochan7
Ryochan7 / moltenwiigamepad
Created June 16, 2017 08:49
Example MoltenGamepad start-up script
#!/bin/sh
disablegids()
{
sleep 6
GAMEPAD_IDS=`xinput | grep "Virtual Gamepad (MoltenGamepad)" | awk '{print $6}' | tr -d "id="`
for gid in $GAMEPAD_IDS
do