Fix saving the correct autoboot option

This commit is contained in:
Maschell 2022-08-29 01:01:11 +02:00
parent 1281dd3c51
commit f324dad6fe
2 changed files with 4 additions and 5 deletions

View File

@ -145,7 +145,6 @@ uint64_t getVWiiHBLTitleId() {
} else {
DEBUG_FUNCTION_LINE_ERR("Failed to add FSAClient");
}
DEBUG_FUNCTION_LINE_ERR("%016llX", titleId);
return titleId;
}

View File

@ -181,13 +181,13 @@ int32_t handleMenuScreen(std::string &configPath, int32_t autobootOptionInput, c
free(screenBuffer);
int32_t selected = 0;
int32_t autoboot = 0;
int32_t selected = -1;
int32_t autoboot = -1;
// convert index to key
if (selectedIndex > 0 && (uint32_t) selectedIndex < menu.size()) {
if (selectedIndex >= 0 && (uint32_t) selectedIndex < menu.size()) {
selected = std::next(menu.begin(), selectedIndex)->first;
}
if (autobootIndex > 0 && (uint32_t) autobootIndex < menu.size()) {
if (autobootIndex >= 0 && (uint32_t) autobootIndex < menu.size()) {
autoboot = std::next(menu.begin(), autobootIndex)->first;
}