Questions tagged [xinput]

XInput is an API that allows applications to receive input from the Xbox 360 Controller for Windows. Controller rumble effects and voice input and output are supported.

XInput, an API for "next generation" controllers, was introduced in December 2005 alongside the launch of the Xbox 360. This instruction set provided full support for Xbox 360 controllers in Windows XP SP1 and subsequent operating systems, and is described by Microsoft as being easier to program for and requiring less setup than DirectInput. XInput is compatible with DirectX version 9 and later.

Additional reading:

Wikipedia

Microsoft MSDN Introduction

142 questions
0
votes
1 answer

XINPUT_GAMEPAD_A does not work unless you hold down the button when program starts

So I am using xinput with my program, it is all set up and working so I can detect my xbox one controller. I want to be able to detect when a button on the controller is pressed. The procedure I use works if I hold down the button when the program…
C. Harrison
  • 15
  • 1
  • 4
0
votes
0 answers

winapi input delay reading events when mouse move and keys are pressed

I'm making a fps based game. Currently I have a wnd_proc function to capture all events for input (WM_MOUSEMOVE, WM_KEYUP, WM_KEYDOWN, ...). My mouse is used to move the camera like in a fps. It works fine when I am only moving the mouse. But when I…
mLjH
  • 425
  • 2
  • 7
  • 11
0
votes
1 answer

Any way to block while reading an XBox 360 controller other than HID API?

I'm trying to read from my XBox 360 controller without polling it. (To be precise, I'm actually using a Logitech F310, but my Windows 10 PC sees it as an XBox 360 controller.) I've written some rather nasty HID code that uses overlapping I/O to…
Stevens Miller
  • 1,387
  • 8
  • 25
0
votes
1 answer

Xbox button pressed in C++

I am trying to write a program in C++ in Visual Studio, to test some of the functionalities of an XBOX controller. I am using xinput and so for can register if a controller is connected to my computer, however, I can work out how to tell if a button…
Jonski Goldstein
  • 169
  • 5
  • 16
0
votes
1 answer

Two xscreens uinput multitouch device, wrong coordinates on second x screen

First of all hi, this is my first question in stackoverflow :) The hardware setup is 2 x nvidia gtx980 GPUs each connected to 3 monitors. The videowall is arranged as one row of 6 monitors. We are using the propietary nvidia drivers. The xserver…
lojkoro
  • 11
  • 2
0
votes
1 answer

C++ XInput Compilation using g++

#include #include #include using namespace std; struct Controller{ XINPUT_STATE state; }; class Joypad { public: int getJoystickPort() { DWORD dwResult; for (DWORD i = 0; i <…
Ben Sat
  • 791
  • 1
  • 5
  • 9
0
votes
2 answers

What's the equivalent of XInput* functions in Linux?

I'm porting an application that uses the Xbox controller to Linux. On windows, it essentially just uses XInputGetState() to read the state of the controller, so I'm looking for a replacement for that function on Linux. I see that wine hasn't…
Shahbaz
  • 46,337
  • 19
  • 116
  • 182
0
votes
1 answer

What is the difference between GamepadButtonFlags and GamepadKeyCode in SharpDX.XInput?

I'm adding gamepad support to my app and I'd like to make sure I'm not misusing either of those for determining whether a key has been pressed. What is the purpose of either GamepadButtonFlags and GamepadKeyCode? Are there any guidelines for which…
user1306322
  • 8,561
  • 18
  • 61
  • 122
0
votes
0 answers

Finnicky #define behaviour in c++

I've started to follow the Handmade Hero series. He's loading XInput manually, and has therefore created a function stub. It looks like this: #define X_INPUT_GET_STATE(name) DWORD WINAPI name(DWORD dwUserIndex, XINPUT_STATE *pState) typedef…
Herbstein
  • 309
  • 4
  • 12
0
votes
0 answers

Hijack user input in Windows

For a program I am making, I want to grab every input (including mouse movements) of the user with my program and convert it into a fake xbox 360/One joystick. This is needed for a game I wanna play where a mouse and keyboard are way more convenient…
guidsdo
  • 432
  • 2
  • 9
0
votes
1 answer

Xinput1.4.dll not working with UWP apps

I am trying to create an UWP app that uses xinput. Trying to get input from a controller using a WPF app , all good. Trying the same code in a UWP app nothing. Am I doing something wrong or xinput really doesn't work with UWP.
Mihail Georgescu
  • 405
  • 3
  • 14
0
votes
1 answer

Xlib xinput test device status if it got hanged

How to check if keyboard (for examle) is not hanged? Maybe it is possible to send something to device and check response using pselect()? I'm using xinput extensions (1,2) do they provide some facility for such a task?
0
votes
1 answer

Psychopy IO Gamepad

I am using Builder in standalone PsychoPy 1.80.07 in Windows. I'm trying to figure out how to create a Code Component to receive responses from a Logitech F310 Gamepad. Ideally, I would like to just use the triggers. I do not get any error code when…
0
votes
1 answer

Xbox 360 Controller API Not Cooperating

I'm trying to go through the XInput tutorial at http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001%28v=vs.85%29.aspx. However, the code from the example won't even execute because it keeps saying that, among other errors, "No Target…
0
votes
1 answer

XInput 360 controller not working with cocos2d-x

Ello All, I'm pretty new to c++ and I've been trying to get this to work for longer than I care to admit. So I've gone off of the following refs and gotten the controller to work in a console app. xbox360 controller input with c using x…
Terrance
  • 11,764
  • 4
  • 54
  • 80
1 2 3
9
10