fix config for gpu settings

This commit is contained in:
georgemoralis 2024-04-28 19:14:56 +03:00
parent 35777a9fb3
commit 7d96308759
1 changed files with 6 additions and 6 deletions

View File

@ -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")) {