> ## 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.

# XFrontPanelGetButtonStates

> XFrontPanelGetButtonStates

# XFrontPanelGetButtonStates

获取正面板按钮的状态。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XFrontPanelGetButtonStates(  
         XFrontPanelButton* buttons  
)  
```

<a id="parametersSection" />

### 参数

*buttons*   \_Out\_\
类型：[XFrontPanelButton](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton)\*

指向一个值的指针，该值指示正面板按钮的当前状态。

<a id="retvalSection" />

### 返回值

类型：HRESULT

如果成功则返回 `S_OK`；否则返回错误代码。

<a id="remarksSection" />

## 注解

XBOX One X 开发套件的正面板包括五个可编程按钮和一个像 5 向 D-pad 一样工作的方向按钮。

<img src="https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/front_panel_display_small.png?fit=max&auto=format&n=-_0FrcE2bDxzGxv-&q=85&s=8c81bf256714cec6526e83a4cbac5538" alt="XBOX One X 的正面板显示屏" width="704" height="362" data-path="images/gdk/reference/front_panel_display_small.png" />

*buttons* 参数指向一个 [XFrontPanelButton](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton) 对象，该对象指示每个按钮的状态。

有关详细信息，请参阅 [XBOX One X: Using the front panel display (NDA topic)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/dev-kits/concepts/scorpio-frontpanel)。

<a id="requirementsSection" />

## 要求

**头文件：** xfrontpaneldisplay.h

**库：** xfrontpaneldisplay.lib

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

<a id="seealsoSection" />

## 另请参阅

[XFrontPanelDisplay](/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members)


## Related topics

- [XFrontPanelButton](/zh-CN/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md)
- [XFrontPanelDisplay](/zh-CN/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelGetLightStates](/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates.md)
- [XFrontPanelLight](/zh-CN/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [XFrontPanelSetLightStates](/zh-CN/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelsetlightstates.md)
