onepad: print a more accurate message when only a single pad is detected

This commit is contained in:
Gregory Hainaut 2017-08-09 21:24:19 +02:00
parent d6c27c190d
commit 8c37418e44
1 changed files with 5 additions and 1 deletions

View File

@ -135,7 +135,11 @@ void JoystickConfiguration::InitJoystickConfiguration()
* Prevent to use a none initialized value on s_vgamePad (core dump)
*/
if (s_vgamePad.size() < m_pad_id + 1) {
wxMessageBox(L"No gamepad detected.");
if (s_vgamePad.empty())
wxMessageBox(L"No gamepad detected.");
else
wxMessageBox(L"No second gamepad detected.");
// disable all checkbox
if (m_isForLeftJoystick) {
m_cb_reverse_Lx->Disable();