語法
參數
此方法沒有參數。傳回值
類型:GameInputLightingGroupsGameInputLightingGroups 旗標的組合,涵蓋裝置上包含至少一個燈具的每個具名燈光群組。如果裝置在任何具名群組中都沒有燈具,則傳回 GameInputLightingGroupUnknown (0)。
備註
傳回值中的每個旗標都會識別一個具名燈具群組 (例如GameInputLightingGroupFaceButtons 或 GameInputLightingGroupCenterLight),您可以使用 IGameInputDevice::SetLightingColor 加以定址。此方法永遠不會將 GameInputLightingGroupUnknown 回報為群組,因為其值為 0。
裝置可能具有不屬於任何具名群組的燈具。因此,傳回值為 0 並不一定表示裝置沒有燈具。若要判斷裝置是否支援燈光,請檢查 IGameInputDevice::GetSupportedInput 是否包含 GameInputKindLighting,或以 GameInputLightingGroupAll 呼叫 IGameInputDevice::GetSupportedLightingGroupSize。若要計算不在具名群組中的燈具數目,請以 GameInputLightingGroupUnknown 呼叫 GetSupportedLightingGroupSize。
下列範例會在具有這些群組的裝置上,將正面按鈕設定為紅色、將中央燈設定為藍色,然後在單一更新中套用這些色彩。
燈光支援取決於裝置和平台。目前,GameInput 支援 Windows 動態燈光 (LampArray) 裝置以及 DualSense 控制器燈條上的燈光。
需求
標頭: GameInput.h 程式庫: gameinput.lib 支援的平台: Windows、XBOX One 系列主機和 XBOX Series 主機另請參閱
GameInput 概觀IGameInputDevice
GameInputLightingGroups
IGameInputDevice::GetSupportedLightingGroupSize
IGameInputDevice::SetLightingColor
IGameInputDevice::ApplyLightingColors
IGameInputDevice::ApplyLightingSystemDefault
