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

# XGameRuntimeIsFeatureAvailable

> XGameRuntimeIsFeatureAvailable

# XGameRuntimeIsFeatureAvailable

Indica se um recurso do Gaming Runtime está disponível.

## Sintaxe

```cpp theme={null}
bool XGameRuntimeIsFeatureAvailable(  
         XGameRuntimeFeature feature  
)  
```

### Parâmetros

*feature*   \
Tipo: [XGameRuntimeFeature](/pt-BR/reference/system/xgameruntimefeature/enums/xgameruntimefeature)

O recurso do Gaming Runtime a ser consultado.

### Valor retornado

Tipo: bool

Retorna **true** se o recurso do Gaming Runtime estiver disponível; caso contrário, **false**.

## Comentários

Depois que o Gaming Runtime for inicializado com [XGameRuntimeInitialize](/pt-BR/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize), use esta função para verificar se recursos específicos do Gaming Runtime estão disponíveis para o seu jogo.

O exemplo a seguir usa a função **XGameRuntimeIsFeatureAvailable** para verificar se os recursos Async, AsyncProvider e TaskQueue estão disponíveis. Os três recursos são necessários para usar filas de tarefas para executar tarefas assíncronas.

```cpp theme={null}
// Confirm that all of the features needed to run asynchronous tasks on 
// task queues are available.
bool Game::CheckAsyncTaskQueueFeatures()
{
    
    return (XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XTaskQueue) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsyncProvider) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsync));

}
```

## Requisitos

**Cabeçalho:** XGameRuntimeFeature.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Documentação conceitual

* [Introdução ao Game Chat 2](/pt-BR/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)

## Confira também

[Glossário do Gaming Runtime](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/gaming-runtime-glossary)\
[Classe XGameRuntimeFeature](/pt-BR/reference/system/xgameruntimefeature/xgameruntimefeature_members)\
[Enumeração XGameRuntimeFeature](/pt-BR/reference/system/xgameruntimefeature/enums/xgameruntimefeature)


## Related topics

- [XGameRuntimeIsFeatureAvailable](/reference/system/xgameruntimefeature/functions/xgameruntimeisfeatureavailable.md)
- [XGameRuntimeFeature](/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)
