fix config for gpu settings
This commit is contained in:
parent
35777a9fb3
commit
7d96308759
|
@ -77,13 +77,13 @@ void load(const std::filesystem::path& path) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains("GPU")) {
|
if (data.contains("GPU")) {
|
||||||
auto generalResult = toml::expect<toml::value>(data.at("GPU"));
|
auto gpuResult = toml::expect<toml::value>(data.at("GPU"));
|
||||||
if (generalResult.is_ok()) {
|
if (gpuResult.is_ok()) {
|
||||||
auto general = generalResult.unwrap();
|
auto gpu = gpuResult.unwrap();
|
||||||
|
|
||||||
screenWidth = toml::find_or<toml::integer>(general, "screenWidth", screenWidth);
|
screenWidth = toml::find_or<toml::integer>(gpu, "screenWidth", screenWidth);
|
||||||
screenHeight = toml::find_or<toml::integer>(general, "screenHeight", screenHeight);
|
screenHeight = toml::find_or<toml::integer>(gpu, "screenHeight", screenHeight);
|
||||||
gpuId = toml::find_or<toml::integer>(general, "gpuId", 0);
|
gpuId = toml::find_or<toml::integer>(gpu, "gpuId", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains("Debug")) {
|
if (data.contains("Debug")) {
|
||||||
|
|
Loading…
Reference in New Issue