mirror of
https://github.com/wiiu-env/EnvironmentLoader.git
synced 2024-12-26 13:01:56 +01:00
Fix clearing the default environment
This commit is contained in:
parent
9b86283cfd
commit
fb5f06064e
@ -359,14 +359,18 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
|
||||
free(screenBuffer);
|
||||
|
||||
if (autoBoot != autobootIndex) {
|
||||
int i = 0;
|
||||
for (auto const&[key, val]: payloads) {
|
||||
if (i == autoBoot) {
|
||||
DEBUG_FUNCTION_LINE("Save config");
|
||||
writeFileContent(AUTOBOOT_CONFIG_PATH, key);
|
||||
break;
|
||||
if (autoBoot == -1) {
|
||||
writeFileContent(AUTOBOOT_CONFIG_PATH, "-1");
|
||||
} else {
|
||||
int i = 0;
|
||||
for (auto const&[key, val]: payloads) {
|
||||
if (i == autoBoot) {
|
||||
DEBUG_FUNCTION_LINE("Save config");
|
||||
writeFileContent(AUTOBOOT_CONFIG_PATH, key);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user