mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Game settings must now include a path or a registry key.
This commit is contained in:
@@ -296,6 +296,14 @@ void SettingsFrame::OnAddGame(wxCommandEvent& event) {
|
||||
wxOK | wxICON_ERROR,
|
||||
this);
|
||||
return;
|
||||
} else if (rowDialog->GetPath().empty() && rowDialog->GetRegistryKey().empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Tried to add a new game with no path or registry key given.";
|
||||
wxMessageBox(
|
||||
translate("Error: A path and/or registry key is required. Row will not be added."),
|
||||
translate("BOSS: Error"),
|
||||
wxOK | wxICON_ERROR,
|
||||
this);
|
||||
return;
|
||||
}
|
||||
|
||||
//Also check that name and folder name don't already exist in the list.
|
||||
@@ -367,6 +375,14 @@ void SettingsFrame::OnEditGame(wxCommandEvent& event) {
|
||||
wxOK | wxICON_ERROR,
|
||||
this);
|
||||
return;
|
||||
} else if (rowDialog->GetPath().empty() && rowDialog->GetRegistryKey().empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Tried to edit a game with no path or registry key given.";
|
||||
wxMessageBox(
|
||||
translate("Error: A path and/or registry key is required. Row will not be added."),
|
||||
translate("BOSS: Error"),
|
||||
wxOK | wxICON_ERROR,
|
||||
this);
|
||||
return;
|
||||
}
|
||||
|
||||
gamesList->SetItem(i, 0, rowDialog->GetName());
|
||||
|
||||
Reference in New Issue
Block a user