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

# XSystemGetDeviceType

> XSystemGetDeviceType

Returns an [XSystemDeviceType](https://docs.xbox.com/reference/system/xsystem/enums/xsystemdevicetype.md) value corresponding to the device currently being used.

## Syntax

```cpp theme={null}
XSystemDeviceType XSystemGetDeviceType(  
)  
```

### Parameters

None.

### Return value

Type: [XSystemDeviceType](https://docs.xbox.com/reference/system/xsystem/enums/xsystemdevicetype.md)

[XSystemDeviceType](https://docs.xbox.com/reference/system/xsystem/enums/xsystemdevicetype.md) enumeration value corresponding to the device currently being used.

> [!NOTE]
>
> This function has no explicit error state, but will return a value of **XSystemDeviceType::Unknown** if it is not possible to determine the device type in use.

## Remarks

This query will return the console mode, as opposed to the actual hardware type, meaning that it is possible for a developer console to masquerade as a different device type when polled by a title.

> [!NOTE]
>
> A Microsoft Game Development Kit (GDK) title built for the XBOX One family will not return a
> device code within the XBOX Series consoles unless the XboxCompatibility setting in the [MicrosoftGame.config](https://docs.xbox.com/reference/system/microsoftgameconfig/microsoftgameconfig-schema.md) file is set to Scarlett. Instead, it will return a code from the XBOX One family
> based on the current device.
>
> | Actual Device / Mode | Built for XBOX One family | Built for XBOX Series consoles |
> | - | - | - |
> | XBOX Series X Dev Kit | XboxOneXDevkit | XboxScarlettDevkit |
> | XBOX Series X Anaconda Profiling Mode | XboxOneX | XboxScarlettAnaconda |
> | XBOX Series S Lockhart Profiling Mode XBOX Series S Test Kit | XboxOneS | XboxScarlettLockhart |
>
> For more information on the target device family usage, see
> [MicrosoftGame.config overview](https://docs.xbox.com/build/core-features/common/game-config/MicrosoftGameConfig-Overview.md).

It is possible to execute this query before calling [XGameRuntimeInitialize](https://docs.xbox.com/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md) in order to allow its usage during early title initialization.

This example gets the type of the device currently being used. If it is running on a devkit, it runs custom code to enable developer features within the game.

```cpp theme={null}
const XSystemDeviceType deviceType = XSystemGetDeviceType(); 
const bool deviceIsDevkit = 
    deviceType == XSystemDeviceType::XboxOneXDevkit || 
    deviceType == XSystemDeviceType::XboxScarlettDevkit; 
 
if (deviceIsDevkit) 
{ 
    EnableGameSpecificDevkitFeatures(); 
}
```

## Requirements

**Header:** XSystem.h

**Library:** xgameruntime.lib

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

## See also

[XSystemDeviceType](https://docs.xbox.com/reference/system/xsystem/enums/xsystemdevicetype.md)\
[XSystem](https://docs.xbox.com/reference/system/xsystem/xsystem_members.md)


## Related topics

- [XSystemDeviceType](https://docs.xbox.com/reference/system/xsystem/enums/xsystemdevicetype.md)
- [Intelligent Delivery: devices specifiers](https://docs.xbox.com/build/core-features/common/packaging/intelligentdelivery-device.md)
- [XSystem (API contents)](https://docs.xbox.com/reference/system/xsystem/xsystem_members.md)
- [Invites across Xbox One Software Development Kit/GDK title versions](https://docs.xbox.com/services/xbox-services/multiplayer/invites/concepts/live-multiplayer-xdkinvites.md)
- [XSystemGetAppSpecificDeviceId](https://docs.xbox.com/reference/system/xsystem/functions/xsystemgetappspecificdeviceid.md)
