If you run into any trouble while following these instructions, drop by #help-line
in the Clone Hero Discord server with your issue/question.
A writeup on how to directly communicate with GIP (Xbox One) devices on a basic level.
I tried Windows.Gaming.Input.Custom and was unable to get it to work, so I resorted to this. Would have liked if I could do things more legitimately with what little documentation was provided, but oh well.
This writeup is not at all comprehensive of every possibilty with the interface, otherwise there'd be far too much to go through.
Thanks to the XInputHooker project for having a bunch of function detours set up, made my life easier when doing all of this.
As of September 16, 2024, the Xbox One controller protocol (known officially as the Gaming Input Protocol, or GIPUSB) has been published as a Microsoft open standard. This document is thus no longer necessary, and certainly not accurate. Refer to the documentation there for guidance on the protocol.
The original document here is preserved as-is, and will not receive any further updates.
import os | |
import sys | |
def sanitize(line): | |
line = line.strip() | |
line = line.replace("\t", " ") | |
for i in range(5): | |
line = line.replace(" ", " ") | |
return line.split(" ") |
#include <cassert> | |
#include <iostream> | |
#include <iomanip> | |
#include <memory> | |
#include <windows.h> | |
#include <wrl.h> | |
// Install the https://www.nuget.org/packages/Microsoft.GameInput package for this example | |
#include <GameInput.h> |
using UnityEngine; | |
using System.IO; | |
using Wasmtime; | |
using UnityEngine.Assertions; | |
using System; | |
namespace Playground | |
{ | |
public class WasmTest : MonoBehaviour | |
{ |