Game settings must now include a path or a registry key.

This commit is contained in:
WrinklyNinja
2013-09-28 14:02:13 +01:00
parent fb2aeb0661
commit 08c00e7abf
+16
View File
@@ -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());