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

# IGameInputDevice::GetTouchSurfaceCount

> Gets the number of touch surfaces on the input device.

Gets the number of touch surfaces on the input device.

## Syntax

```cpp theme={null}
uint32_t GetTouchSurfaceCount();
```

### Parameters

This method has no parameters.

### Return value

Type: uint32\_t

The number of touch surfaces on the device, or 0 if the device has no touch surfaces.

## Remarks

A touch surface is an area of the device that reports touch contacts, such as the touchpad on a DualSense or DualShock 4 controller. Devices with at least one touch surface include `GameInputKindTouch` in the value returned by [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md).

Touch surfaces are identified by a zero-based index that's less than the value returned by this method. Use the index to get a description of the surface by calling [IGameInputDevice::GetTouchSurfaceInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_gettouchsurfaceinfo.md), and to read the contacts on the surface from a reading by calling [IGameInputReading::GetTouchSurfaceState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_gettouchsurfacestate.md).

The number of touch surfaces doesn't change for the lifetime of the device object.

> [!NOTE]
>
> Touch support depends on the device and the platform.

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInputDevice::GetTouchSurfaceInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_gettouchsurfaceinfo.md)\
[GameInputTouchSurfaceInfo](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/structs/gameinputtouchsurfaceinfo)\
[IGameInputReading::GetTouchSurfaceState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_gettouchsurfacestate.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [IGameInputDevice::GetTouchSurfaceInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_gettouchsurfaceinfo.md)
- [IGameInputReading::GetTouchContactCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_gettouchcontactcount.md)
- [IGameInputReading::GetTouchSurfaceState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_gettouchsurfacestate.md)
- [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
