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.
The Xbox One controller protocol is quite in-depth. This is a collection of all the information I've gathered over time about it, most of which is sourced from medusalix's xone
driver for Linux. There's a little bit of my own research/reverse engineering in there too, but a majority of the information comes from xone
.
The info here refers to the USB/wireless side of things, it does not fully apply to the interface the Xbox One controller driver on Windows exposes. That interface is covered here. The wireless receiver protocol is also not documented here, as that's its own beast to handle.
Struct definitions and code examples are not guaranteed to be valid C/C++ code, and are meant mainly for efficiently defining how things are structured or handled. All structs are assumed to be packed with 1-byte alignment.
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> |