แชร์ผ่าน


Cloud Aware API calls

Use this topic to detect if your Cloud Aware title is capable of streaming so that you can optimize your game for Xbox Game Streaming.

Set up your game for streaming

During game initialization, ensure that you've set up the game streaming component by using XGameStreamingInitialize as shown in the following code.


// Initialize the game streaming component
XGameStreamingInitialize();

To detect if there are any active streaming clients that are currently connected, use XGameStreamingIsStreaming as shown in the following code.

 if (XGameStreamingIsStreaming())
 {
     // The game is currently streaming to at least one device
     // Enable any customizations that might be useful when running from the cloud
 }

Manage the connection state

If there are any active streaming clients, your game has a point-in-time understanding of those clients when using XGameStreamingIsStreaming. To receive notification when a streaming client connects or disconnects from your game, use XGameStreamingRegisterConnectionStateChanged.

See also

XGameStreaming (API contents) Optimizing your game