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

# XSystemDeviceType

> XSystemDeviceType

# XSystemDeviceType

[XSystemGetDeviceType](/reference/system/xsystem/functions/xsystemgetdevicetype) の呼び出しによって返されるシステム デバイスの種類を示します。

<a id="syntaxSection" />

## 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
}
```

<a id="constantsSection" />

## Constants

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

<a id="remarksSection" />

## Remarks

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

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

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

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

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

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

<a id="requirementsSection" />

## Requirements

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

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

<a id="seealsoSection" />

## See also

[XSystem](/reference/system/xsystem/xsystem_members)\
[XSystemGetDeviceType](/reference/system/xsystem/functions/xsystemgetdevicetype)\
[XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize)


## Related topics

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