InputConfigDiag: Don't prevent closing dialog if device not found

There is no reason to prevent the user from closing the config dialog
if the device is not found. It's not very good UX…

Also fixes ExpressionParser to return NO_DEVICE if the device doesn't
exist instead of SUCCESS.
This commit is contained in:
Léo Lam
2016-07-13 16:51:19 +02:00
parent be9416c462
commit 77fab5940c
2 changed files with 9 additions and 9 deletions

View File

@ -320,7 +320,8 @@ bool ControlDialog::Validate()
UpdateGUI();
return control_reference->parse_error == EXPRESSION_PARSE_SUCCESS;
return (control_reference->parse_error == EXPRESSION_PARSE_SUCCESS ||
control_reference->parse_error == EXPRESSION_PARSE_NO_DEVICE);
}
void GamepadPage::SetDevice(wxCommandEvent&)