Gamepad2.IsTrusted Property
Determines whether a connected gamepad is a trusted device.
Syntax
public:
property bool IsTrusted {
bool get ();
}
Property value
Type: bool
True if the connected gamepad is a trusted device, false otherwise.
Remarks
This property informs developers whether the gamepad input appears to be coming from a real gamepad or a potential competitive advantage device.
Note
This is a cross-OS call. For more information, see Cross-OS Calls.
Detection and Triggering
The detection of conversion devices involves many factors, one of them being input behavior profiling. This profiling works in the following conditions:
- The connected device is wired, as is the case in all input conversion device usages.
- The device is used in a game, and keyboard + mouse converted input is generated for a duration of roughly 5-10 minutes (cumulative). The overall Timing depends on how much user input is generated, so the IsTrusted flag could trigger sooner or later than the 5-10 minute window, however, on average, it usually takes between 5-10 minutes.
- The input behavior profiling is not done in the system, non-game applications, or during System UI overlays on top of games.
- Once enough input is generated and meets the criteria of an untrusted device, the IsTrusted property will return false until the following:
- The device disconnects and reconnects over a wireless connection.
- Wireless security, encryption, and other mechanisms make this challenging space for input conversion.
- Valid gamepad usage over USB is profiled for another 5-10 minutes and is deemed trusted.
Handling Untrusted Devices
You can choose how and when to enforce the handling of untrusted gamepads. For example, some games may want to allow input conversion devices in single player experiences, but not in multiplayer ones. Other games may choose to not allow them altogether.
- It is recommended that you allow users to unblock themselves in a case of enforcement, such as suggesting the usage of connecting over wireless, or other means.
- You should put the trusted gamepad check behind a service-side setting, so that the enablement of this detection can be title-controlled and can change with title updates as necessary. This value should also be used in conjunction with telemetry and reports that the game collects, to either make determinations about enforcement, or for pure data collection purposes.
Requirements
Namespace: Windows.Xbox.Input
Metadata: windows.winmd
See also
Reference
IGamepad2 Class
IGamepad2 Members
Windows.Xbox.Input Namespace