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

# GameInput と既存の入力スタックの組み合わせ

> GameInput と既存の入力スタックの組み合わせ

<a id="introductionSection" />

GameInput の機能は将来のデバイスに拡張可能であり、アプリケーションに対して抽象化されることが保証されているため、アプリケーションはできる限り多くの入力コードを `GameInput` に移行することをお勧めします。`GameInput` の機能は、以前のすべての入力 API のスーパーセットです。その結果、以前の入力 API からの移植は、ほとんどの場合単純なプロセスです。最大の変更は通常、`GameInput` がデバイス中心ではなく入力中心であることに由来します。以前の API を使用するコードは、通常、入力を読み取る前に入力デバイスを列挙します。しかし、`GameInput` ではこれは必要ありません。`GameInput` の入力中心モデルへの適応は、通常、移植される以前のコードに対する構造的変更の大部分を占めます。

以下のトピックでは、`GameInput` と以前の入力 API との違いについて詳しく説明します。これらのトピックには、API 間の最大の違いを強調するコード例も含まれています。

[Windows.Xbox.Input から GameInput への移植](/build/core-features/common/input/porting/input-porting-wxi)

元の XBOX One Software Development Kit の `Windows.Xbox.Input` からの移植について説明します。

[XInput から GameInput への移植](/build/core-features/common/input/porting/input-porting-xinput)

`XInput` からの移植について説明します。

<a id="sideBySideSection" />

## 古い API と並行して GameInput を使用する

古いインターフェイスや API と並行して GameInput コードを使用したいアプリケーションのために、API はこのユースケースも許可できる柔軟性があります。これにより、アプリケーションは入力スタック全体を置き換えることなく、センサーや触覚サポートなどの新機能を簡単に活用できます。バージョン 1 (v1) 以降、`GameInputDeviceInfo` には基盤となるデバイスへのパスを表す `pnppath` フィールドが含まれています。このフィールドは DirectInput によって提供される `DIPROPGUIDANDPATH` のパスと同じです。アプリケーションが `CreateFile` を呼び出してデバイスと直接インターフェイスするためにも使用できます。ゲームパッド以外の Game Input Protocol (GIP) デバイスは、直接開くことができないため、このプロパティを持っていない可能性があることに注意してください。

<a id="seeAlsoSection" />

## 関連項目

[GameInput の概要](/build/core-features/common/input/overviews/input-overview)

[Input API リファレンス](/reference/input/gc-reference-input-toc)

[Microsoft Game Development Kit](/services/playfab/sdks/platforms/gdk)


## Related topics

- [既存の入力コードを GameInput に移植する](/ja-jp/build/core-features/common/input/porting/index.md)
- [Event Partitioning クイックスタート (プレビュー)](/ja-jp/services/playfab/data-analytics/export-data/event-partitioning-quickstart.md)
- [GAMEPAD_BUTTONS 列挙型](/ja-jp/reference/tools/xtf/xtfinput/enumerations/GAMEPAD_BUTTONS-typedef-xtfinput-xbox-windows-t.md)
- [IGameInput::CreateAggregateDevice](/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createaggregatedevice.md)
- [GameInput コールバック](/ja-jp/build/core-features/common/input/advanced/input-callbacks.md)
