2023-03-24 at 2:07 PM UTC
Instigator
Naturally Camouflaged
[the staring tame crusher]
You deserve support.
I'll see if one of our counsellors is available.
2023-03-24 at 2:25 PM UTC
Skip to main content
Sign in
Search
XInput Game Controller APIs
Overview
XINPUT_BATTERY_INFORMATION structure
XINPUT_CAPABILITIES structure
XINPUT_GAMEPAD structure
XINPUT_KEYSTROKE structure
XINPUT_STATE structure
XINPUT_VIBRATION structure
XInputEnable function
XInputGetAudioDeviceIds function
XInputGetBatteryInformation function
XInputGetCapabilities function
XInputGetDSoundAudioDeviceGuids function
XInputGetKeystroke function
XInputGetState function
XInputSetState function
Apps Win32 API XInput Game Controller APIs Xinput.h
XInputGetDSoundAudioDeviceGuids function (xinput.h)
Article
10/04/2021
2 minutes to read
Gets the sound rendering and sound capture device GUIDs that are associated with the headset connected to the specified controller.
Syntax
C++
DWORD XInputGetDSoundAudioDeviceGuids(
DWORD dwUserIndex,
GUID *pDSoundRenderGuid,
GUID *pDSoundCaptureGuid
);
Parameters
dwUserIndex
[in] Index of the user's controller. It can be a value in the range 0–3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.
pDSoundRenderGuid
[out] Pointer that receives the GUID of the headset sound rendering device.
pDSoundCaptureGuid
[out] Pointer that receives the GUID of the headset sound capture device.
Return value
If the function successfully retrieves the device IDs for render and capture, the return code is ERROR_SUCCESS.
If there is no headset connected to the controller, the function also retrieves ERROR_SUCCESS with GUID_NULL as the values for pDSoundRenderGuid and pDSoundCaptureGuid.
If the controller port device is not physically connected, the function returns ERROR_DEVICE_NOT_CONNECTED.
If the function fails, it returns a valid Win32 error code.
Remarks
Use of legacy DirectSound is not recommended, and DirectSound is not available for Windows Store apps.
Note XInputGetDSoundAudioDeviceGuids is deprecated because it isn't supported by Windows 8 (XInput 1.4).
Platform Requirements
DirectX SDK (XInput 1.3), Windows Vista (XInput 9.1.0)
Requirements
Target Platform Windows
Header xinput.h
Library Xinput.lib; Xinput9_1_0.lib
DLL Xinput9_1_0.dll
See also
XInput Functions
XInputGetState
In this article
Syntax
Parameters
Return value
Remarks
Previous Versions
Blog
Contribute
Privacy
Terms of Use
Trademarks
© Microsoft 2023
2023-03-24 at 2:25 PM UTC
Skip to main content
Sign in
Search
XInput Game Controller APIs
Overview
XINPUT_BATTERY_INFORMATION structure
XINPUT_CAPABILITIES structure
XINPUT_GAMEPAD structure
XINPUT_KEYSTROKE structure
XINPUT_STATE structure
XINPUT_VIBRATION structure
XInputEnable function
XInputGetAudioDeviceIds function
XInputGetBatteryInformation function
XInputGetCapabilities function
XInputGetDSoundAudioDeviceGuids function
XInputGetKeystroke function
XInputGetState function
XInputSetState function
Apps Win32 API XInput Game Controller APIs Xinput.h
XInputGetAudioDeviceIds function (xinput.h)
Article
10/12/2021
2 minutes to read
Retrieves the sound rendering and sound capture audio device IDs that are associated with the headset connected to the specified controller.
Syntax
C++
DWORD XInputGetAudioDeviceIds(
[in] DWORD dwUserIndex,
[out, optional] LPWSTR pRenderDeviceId,
[in, out, optional] UINT *pRenderCount,
[out, optional] LPWSTR pCaptureDeviceId,
[in, out, optional] UINT *pCaptureCount
);
Parameters
[in] dwUserIndex
Index of the gamer associated with the device.
[out, optional] pRenderDeviceId
Windows Core Audio device ID string for render (speakers).
[in, out, optional] pRenderCount
Size, in wide-chars, of the render device ID string buffer.
[out, optional] pCaptureDeviceId
Windows Core Audio device ID string for capture (microphone).
[in, out, optional] pCaptureCount
Size, in wide-chars, of capture device ID string buffer.
Return value
If the function successfully retrieves the device IDs for render and capture, the return code is ERROR_SUCCESS.
If there is no headset connected to the controller, the function will also retrieve ERROR_SUCCESS with NULL as the values for pRenderDeviceId and pCaptureDeviceId.
If the controller port device is not physically connected, the function will return ERROR_DEVICE_NOT_CONNECTED.
If the function fails, it will return a valid Win32 error code.
Remarks
Callers must allocate the memory for the buffers passed to XInputGetAudioDeviceIds. The resulting strings can be of arbitrary length.
Platform Requirements
Windows 8 (XInput 1.4)
Requirements
Target Platform Windows
Header xinput.h
Library Xinput.lib
DLL Xinput1_4.dll
See also
Core Audio APIs
XInput Functions
XInputGetDSoundAudioDeviceGuids
Recommended content
XINPUT_CAPABILITIES (xinput.h) - Win32 apps
Describes the capabilities of a connected controller. The XInputGetCapabilities function returns XINPUT_CAPABILITIES.
Xinput.h header - Win32 apps
Functions (Programming Reference) - Win32 apps
Available XInput functions.
XInputGetState function (xinput.h) - Win32 apps
Retrieves the current state of the specified controller.
In this article
Syntax
Parameters
Return value
Remarks
Previous Versions
Blog
Contribute
Privacy
Terms of Use
Trademarks
© Microsoft 2023
2023-03-24 at 2:26 PM UTC
Building
Visual Studio (IDE)
If you didn't already, install Visual Studio Community 2019 via the official guide. When asked about the workloads, select .NET Desktop Development.
Get the code project via Git or by using the Download ZIP button.
Open Visual Studio Community and open the solution file (BetterJoy.sln).
Open the NuGet manager via Tools > NuGet Package Manager > Package Manager Settings.
You should have a warning mentioning restoring your packages. Click on the Restore button.
You can now run and build BetterJoy.
Visual Studio Build Tools (CLI)
Download Visual Studio Build Tools via the official link.
Install NuGet by following the official guide. You should follow the section for nuget.exe. Verify that you can run nuget from your favourite terminal.
Get the code project via Git or by using the Download ZIP button.
Open a terminal (cmd, PowerShell, ...) and enter the folder with the source code.
Restore the NuGet dependencies by running: nuget restore
Now build the app with MSBuild:
msbuild .\BetterJoy.sln -p:Configuration=CONFIGURATION -p:Platform=PLATFORM -t:Rebuild
The available values for CONFIGURATION are Release and Debug. The available values for PLATFORM are x86 and x64 (you want the latter 99.99% of the time).
You have now built the app. See the next section for locating the binaries.
Binaries location
The built binaries are located under
BetterJoyForCemu\bin\PLATFORM\CONFIGURATION
where PLATFORM and CONFIGURATION are the one provided at build time.
2023-03-24 at 3:02 PM UTC
The following users say it would be alright if the author of this
post didn't die in a fire!
2023-03-24 at 3:04 PM UTC
Sudo
Black Hole
[my hereto riemannian peach]
AYO I DISNT READ ANYTHING BEYOND THE TITLE AND NOT EVEN ALL OF THAT BUT OP MAKES SOME REALLY GOOD POINTZ LETS HANG ON HIS EVERY WORD
2023-03-24 at 5:20 PM UTC
I got the mouse to work but it only works on full screen and this game specifically crashes on full screen
So 👍
The following users say it would be alright if the author of this
post didn't die in a fire!
2023-03-24 at 9:42 PM UTC
Well it looks like you're on top of things.
The following users say it would be alright if the author of this
post didn't die in a fire!
2023-03-24 at 11:42 PM UTC
At one time, you had to configure your IRQs and DMAs yourself by trial and error. Not much has changed since then.