Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Toggle wiimote status based on the actual status, instead of some dum…
…b checkbox that is almost never even right.

The checkbox is still wrong when starting emulation, but it's now purely cosmetic.

Actually fixes issue 5594.
  • Loading branch information
rog9 committed Dec 29, 2012
1 parent e9d00bf commit 670ca7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/Core/DolphinWX/Src/FrameTools.cpp
Expand Up @@ -1469,13 +1469,17 @@ void CFrame::ConnectWiimote(int wm_idx, bool connect)
wxString msg(wxString::Format(wxT("Wiimote %i %s"), wm_idx + 1,
connect ? wxT("Connected") : wxT("Disconnected")));
Core::DisplayMessage(msg.ToAscii(), 3000);

// Wait for the wiimote to connect
while (GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->IsConnected() != connect)
{}
Host_UpdateMainFrame();
}
}

void CFrame::OnConnectWiimote(wxCommandEvent& event)
{
ConnectWiimote(event.GetId() - IDM_CONNECT_WIIMOTE1, event.IsChecked());
ConnectWiimote(event.GetId() - IDM_CONNECT_WIIMOTE1, !GetUsbPointer()->AccessWiiMote((event.GetId() - IDM_CONNECT_WIIMOTE1) | 0x100)->IsConnected());
}

// Toogle fullscreen. In Windows the fullscreen mode is accomplished by expanding the m_Panel to cover
Expand Down

0 comments on commit 670ca7e

Please sign in to comment.