> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameStreamingGamepadPhysicality

> XGameStreamingGamepadPhysicality

# XGameStreamingGamepadPhysicality

标准 XBOX 无线控制器上每个按钮、摇杆和扳机的物理性映射。对于任何给定的按钮/摇杆/扳机，物理性可以是未知、物理、虚拟或两者兼有。

## 语法

```cpp theme={null}
enum class XGameStreamingGamepadPhysicality  : uint64_t  
{  
    None = 0x0000000000000000,  
    DPadUpPhysical = 0x0000000000000001,  
    DPadDownPhysical = 0x0000000000000002,  
    DPadLeftPhysical = 0x0000000000000004,  
    DPadRightPhysical = 0x0000000000000008,  
    MenuPhysical = 0x0000000000000010,  
    ViewPhysical = 0x0000000000000020,  
    LeftThumbstickPhysical = 0x0000000000000040,  
    RightThumbstickPhysical = 0x0000000000000080,  
    LeftShoulderPhysical = 0x0000000000000100,  
    RightShoulderPhysical = 0x0000000000000200,  
    APhysical = 0x0000000000001000,  
    BPhysical = 0x0000000000002000,  
    XPhysical = 0x0000000000004000,  
    YPhysical = 0x0000000000008000,  
    LeftTriggerPhysical = 0x0000000000010000,  
    RightTriggerPhysical = 0x0000000000020000,  
    LeftThumbstickXPhysical = 0x0000000000040000,  
    LeftThumbstickYPhysical = 0x0000000000080000,  
    RightThumbstickXPhysical = 0x0000000000100000,  
    RightThumbstickYPhysical = 0x0000000000200000,  
    ButtonsPhysical = 0x000000000000F3FF,  
    AnalogsPhysical = 0x00000000003F0000,  
    AllPhysical = 0x00000000003FF3FF,  
    DPadUpVirtual = 0x0000000100000000,  
    DPadDownVirtual = 0x0000000200000000,  
    DPadLeftVirtual = 0x0000000400000000,  
    DPadRightVirtual = 0x0000000800000000,  
    MenuVirtual = 0x0000001000000000,  
    ViewVirtual = 0x0000002000000000,  
    LeftThumbstickVirtual = 0x0000004000000000,  
    RightThumbstickVirtual = 0x0000008000000000,  
    LeftShoulderVirtual = 0x0000010000000000,  
    RightShoulderVirtual = 0x0000020000000000,  
    AVirtual = 0x0000100000000000,  
    BVirtual = 0x0000200000000000,  
    XVirtual = 0x0000400000000000,  
    YVirtual = 0x0000800000000000,  
    LeftTriggerVirtual = 0x0001000000000000,  
    RightTriggerVirtual = 0x0002000000000000,  
    LeftThumbstickXVirtual = 0x0004000000000000,  
    LeftThumbstickYVirtual = 0x0008000000000000,  
    RightThumbstickXVirtual = 0x0010000000000000,  
    RightThumbstickYVirtual = 0x0020000000000000,  
    ButtonsVirtual = 0x0000F3FF00000000,  
    AnalogsVirtual = 0x003F000000000000,  
    AllVirtual = 0x003FF3FF00000000,  
}  
```

## 常量

| 常量                       | 说明            |
| ------------------------ | ------------- |
| None                     | 无游戏板按钮        |
| DPadUpPhysical           | 物理游戏板方向键上按钮   |
| DPadDownPhysical         | 物理游戏板方向键下按钮   |
| DPadLeftPhysical         | 物理游戏板方向键左按钮   |
| DPadRightPhysical        | 物理游戏板方向键右按钮   |
| MenuPhysical             | 物理游戏板 Menu 按钮 |
| ViewPhysical             | 物理游戏板 View 按钮 |
| LeftThumbstickPhysical   | 物理游戏板左摇杆按下按钮  |
| RightThumbstickPhysical  | 物理游戏板右摇杆按下按钮  |
| LeftShoulderPhysical     | 物理游戏板左肩键      |
| RightShoulderPhysical    | 物理游戏板右肩键      |
| APhysical                | 物理游戏板 A 按钮    |
| BPhysical                | 物理游戏板 B 按钮    |
| XPhysical                | 物理游戏板 X 按钮    |
| YPhysical                | 物理游戏板 Y 按钮    |
| LeftTriggerPhysical      | 物理游戏板左扳机      |
| RightTriggerPhysical     | 物理游戏板右扳机      |
| LeftThumbstickXPhysical  | 物理游戏板左摇杆水平位置  |
| LeftThumbstickYPhysical  | 物理游戏板左摇杆垂直位置  |
| RightThumbstickXPhysical | 物理游戏板右摇杆水平位置  |
| RightThumbstickYPhysical | 物理游戏板右摇杆垂直位置  |
| ButtonsPhysical          | 所有按钮均为物理      |
| AnalogsPhysical          | 所有模拟输入均为物理    |
| AllPhysical              | 所有输入均为物理      |
| DPadUpVirtual            | 虚拟游戏板方向键上按钮   |
| DPadDownVirtual          | 虚拟游戏板方向键下按钮   |
| DPadLeftVirtual          | 虚拟游戏板方向键左按钮   |
| DPadRightVirtual         | 虚拟游戏板方向键右按钮   |
| MenuVirtual              | 虚拟游戏板 Menu 按钮 |
| ViewVirtual              | 虚拟游戏板 View 按钮 |
| LeftThumbstickVirtual    | 虚拟游戏板左摇杆按下按钮  |
| RightThumbstickVirtual   | 虚拟游戏板右摇杆按下按钮  |
| LeftShoulderVirtual      | 虚拟游戏板左肩键      |
| RightShoulderVirtual     | 虚拟游戏板右肩键      |
| AVirtual                 | 虚拟游戏板 A 按钮    |
| BVirtual                 | 虚拟游戏板 B 按钮    |
| XVirtual                 | 虚拟游戏板 X 按钮    |
| YVirtual                 | 虚拟游戏板 Y 按钮    |
| LeftTriggerVirtual       | 虚拟游戏板左扳机      |
| RightTriggerVirtual      | 虚拟游戏板右扳机      |
| LeftThumbstickXVirtual   | 虚拟游戏板左摇杆水平位置  |
| LeftThumbstickYVirtual   | 虚拟游戏板左摇杆垂直位置  |
| RightThumbstickXVirtual  | 虚拟游戏板右摇杆水平位置  |
| RightThumbstickYVirtual  | 虚拟游戏板右摇杆垂直位置  |
| ButtonsVirtual           | 所有按钮均为虚拟      |
| AnalogsVirtual           | 所有模拟输入均为虚拟    |
| AllVirtual               | 所有输入均为虚拟      |

## 备注

游戏可以使用 [XGameStreamingGamepadPhysicality](/reference/system/xgamestreaming/enums/xgamestreaminggamepadphysicality) 了解 `IGameInputReading` 是否包含来自物理控制器、虚拟触摸控制器或两者的输入。

目前仅支持游戏板读取。

可以组合标志以表示多个值。

`AllPhysical` 或 `AllVirtual` 值可用于标识所有输入是否为特定类型，从而用于做出游戏决策，例如向玩家提供哪些视觉提示。

## 要求

**标头：** xgamestreaming.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameStreamingGetGamepadPhysicality](/reference/system/xgamestreaming/functions/xgamestreaminggetgamepadphysicality)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingGetGamepadPhysicality](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetgamepadphysicality.md)
- [XGameStreaming](/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)
- [GAMEPAD_VIBRATION](/zh-CN/reference/tools/xtf/xtfinput/structures/gamepad_vibration.md)
- [XINPUT_GAMEPAD](/zh-CN/reference/input/xinputongameinput/structs/xinput_gamepad.md)
- [XGameStreamingGetAssociatedFrame](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetassociatedframe.md)
