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

# XGameRuntimeOptions

> XGameRuntimeOptions

# XGameRuntimeOptions

有关 XGameRuntimeOptions 结构的信息。

## Syntax

```cpp theme={null}
struct XGameRuntimeOptions 
{ 
    XGameRuntimeGameConfigSource gameConfigSource; 
    const char* gameConfig; 
}  
```

### Members

*gameConfigSource*\
类型：XGameRuntimeGameConfigSource

*gameConfig*\
类型：const char\*

## Remarks

gameConfig 字段允许应用将游戏配置传递给运行时。gameConfig 可以按 gameConfigSource 字段所指定的方式以不同方式指定。它可以是以下方式之一：

| 游戏配置类型 | 解释 |
| - | - |
| Default | gameConfig 必须在此处为 null。将使用进程的默认游戏配置。 |
| Inline | gameConfig 是一个包含整个游戏配置内容的 UTF-8 字符串。 |
| File | gameConfig 是游戏配置文件的路径。这可以是绝对路径，也可以是相对于当前目录的相对路径。 |

## Requirements

**头文件：** XGameRuntimeInit.h

**库：** xgameruntime.lib

**受支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## See also

[XGameRuntimeInitializeWithOptions](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/functions/xgameruntimeinitializewithoptions.md)\
[XGameRuntimeConfigSource](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/Enumerations/xgameruntimegameconfigsource.md)\
[XGameRuntimeInit](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/xgameruntimeinit_members.md)\
[使用 Gaming Runtime 开发新标题](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/pc-dev/overviews/gr-developing-new-titles-on-gamecore)


## Related topics

- [XGameRuntimeInitializeWithOptions](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/functions/xgameruntimeinitializewithoptions.md)
- [XGameRuntimeGameConfigSource](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/Enumerations/xgameruntimegameconfigsource.md)
- [XGameRuntimeInitialize](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
- [XGameRuntimeInit（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/xgameruntimeinit_members.md)
- [XGameRuntimeUninitialize](https://docs.xbox.com/zh-CN/reference/system/xgameruntimeinit/functions/xgameruntimeuninitialize.md)
