mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00:00
Emulated Wiimote: Fixed a bug that would make PadMapping[0].ID = -1, that would lead to a segmentation fault in Linux when we tried to access joyinfo[-1]
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2287 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9ed368b35a
commit
12a869304c
3 changed files with 13 additions and 11 deletions
|
@ -48,8 +48,9 @@ bool StrangeHack = true;
|
|||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void ConfigBox::PadGetStatus()
|
||||
{
|
||||
// Return if it's not detected
|
||||
if(PadMapping[notebookpage].ID >= SDL_NumJoysticks())
|
||||
/* Return if it's not detected. The ID should never be less than zero here, it can only be that
|
||||
because of a manual ini file change, but we make that check anway. */
|
||||
if(PadMapping[notebookpage].ID >= 0 && PadMapping[notebookpage].ID >= SDL_NumJoysticks())
|
||||
{
|
||||
m_TStatusIn[notebookpage]->SetLabel(wxT("Not connected"));
|
||||
m_TStatusOut[notebookpage]->SetLabel(wxT("Not connected"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue