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

# XFrontPanelGetLightStates

> XFrontPanelGetLightStates

# XFrontPanelGetLightStates

获取正面板指示灯的状态。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XFrontPanelGetLightStates(  
         XFrontPanelLight* lights  
)  
```

<a id="parametersSection" />

### 参数

*lights*   \_Out\_\
类型：[XFrontPanelLight](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight)\*

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

<a id="retvalSection" />

### 返回值

类型：HRESULT

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

<a id="remarksSection" />

## 注解

XBOX One X 开发套件的正面板包括与五个可编程按钮相对应的五个指示灯。

<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" />

*lights* 参数指向一个 [XFrontPanelLight](/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight) 对象，该对象指示每个指示灯的状态。

若要设置正面板指示灯的状态，请使用 [XFrontPanelSetLightStates](/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelsetlightstates)。

有关详细信息，请参阅 [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

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