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

# XSystemDeviceType

> XSystemDeviceType

# XSystemDeviceType

[XSystemGetDeviceType](https://docs.xbox.com/ja-jp/reference/system/xsystem/functions/xsystemgetdevicetype.md) の呼び出しによって返されるシステム デバイスの種類を示します。

## Syntax

```cpp theme={null}
enum class XSystemDeviceType  : uint32_t
{
    Unknown              = 0x00,
    Pc                   = 0x01,
    XboxOne              = 0x02,
    XboxOneS             = 0x03,
    XboxOneX             = 0x04,
    XboxOneXDevkit       = 0x05,
    XboxScarlettLockhart = 0x06,
    XboxScarlettAnaconda = 0x07,
    XboxScarlettDevkit   = 0x08
}
```

## Constants

| 定数 | 説明 |
| - | - |
| Unknown | デバイスの種類が不明です。この値は `XSystemGetDeviceType` がデバイスの種類を判別できない場合に返されます。 |
| Pc | デバイスは PC です。 |
| XboxOne | デバイスは XBOX One です。 |
| XboxOneS | デバイスは XBOX One S です。 |
| XboxOneX | デバイスは XBOX One X です。 |
| XboxOneXDevkit | デバイスは XBOX One X Dev Kit です。 |
| XboxScarlettLockhart | デバイスは XBOX Series S です。 |
| XboxScarlettAnaconda | デバイスは XBOX Series X です。 |
| XboxScarlettDevkit | デバイスは XBOX Series X Dev Kit です。 |

## Remarks

`XSystemGetDeviceType` 関数には明示的なエラー状態はありません。システム デバイスの種類を判別できない場合、`XSystemDeviceType::Unknown` の値を返します。

`XSystemGetDeviceType` は、タイトルの初期化の早い段階で [XGameRuntimeInitialize](https://docs.xbox.com/ja-jp/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md) を呼び出す前に呼び出すことができます。

次のコード例は、現在使用中のシステム デバイスの種類を取得します。開発キット上で実行されている場合、ゲーム内で開発者機能を有効にするカスタム コードを実行します。

```cpp theme={null}
const XSystemDeviceType deviceType = XSystemGetDeviceType();

const bool deviceIsDevkit = 
    deviceType == XSystemDeviceType::XboxOneXDevkit || 
    deviceType == XSystemDeviceType::XboxScarlettDevkit;

if (deviceIsDevkit)
{
    EnableGameSpecificDevkitFeatures();
}
```

## Requirements

**ヘッダー:** XSystem.h

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## See also

[XSystem](https://docs.xbox.com/ja-jp/reference/system/xsystem/xsystem_members.md)\
[XSystemGetDeviceType](https://docs.xbox.com/ja-jp/reference/system/xsystem/functions/xsystemgetdevicetype.md)\
[XGameRuntimeInitialize](https://docs.xbox.com/ja-jp/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)


## Related topics

- [XSystemGetDeviceType](https://docs.xbox.com/ja-jp/reference/system/xsystem/functions/xsystemgetdevicetype.md)
- [XSystem (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xsystem/xsystem_members.md)
- [Intelligent Delivery: デバイス指定子](https://docs.xbox.com/ja-jp/build/core-features/common/packaging/intelligentdelivery-device.md)
- [PlayFab Party チャットの仕組みを理解する](https://docs.xbox.com/ja-jp/services/playfab/community/voice-communications/concepts-chat.md)
- [XUserFindForDevice](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xuserfindfordevice.md)
