diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 8917e20cc6..f3d3107aeb 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -41,6 +41,7 @@ static const struct { { "Wiimote2Connect", 50 /* '2' */, 2 /* wxMOD_CMD */ }, { "Wiimote3Connect", 51 /* '3' */, 2 /* wxMOD_CMD */ }, { "Wiimote4Connect", 52 /* '4' */, 2 /* wxMOD_CMD */ }, + { "BalanceBoardConnect",53 /* '4' */, 2 /* wxMOD_CMD */ }, #else { "Open", 79 /* 'O' */, 2 /* wxMOD_CONTROL */}, { "ChangeDisc", 0, 0 /* wxMOD_NONE */ }, @@ -64,6 +65,7 @@ static const struct { { "Wiimote2Connect", 345 /* WXK_F6 */, 1 /* wxMOD_ALT */ }, { "Wiimote3Connect", 346 /* WXK_F7 */, 1 /* wxMOD_ALT */ }, { "Wiimote4Connect", 347 /* WXK_F8 */, 1 /* wxMOD_ALT */ }, + { "BalanceBoardConnect",348 /* WXK_F9 */, 1 /* wxMOD_ALT */ }, #endif { "LoadStateSlot1", 340 /* WXK_F1 */, 0 /* wxMOD_NONE */ }, diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h index 6f2219e9f8..c69d79eb9d 100644 --- a/Source/Core/Core/Src/CoreParameter.h +++ b/Source/Core/Core/Src/CoreParameter.h @@ -32,6 +32,7 @@ enum Hotkey HK_WIIMOTE2_CONNECT, HK_WIIMOTE3_CONNECT, HK_WIIMOTE4_CONNECT, + HK_BALANCEBOARD_CONNECT, HK_LOAD_STATE_SLOT_1, HK_LOAD_STATE_SLOT_2, diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 1e0e0c756c..dd2b0f1cd4 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -215,7 +215,7 @@ EVT_MENU_RANGE(IDM_LOADLAST1, IDM_LOADLAST8, CFrame::OnLoadLastState) EVT_MENU_RANGE(IDM_SAVESLOT1, IDM_SAVESLOT8, CFrame::OnSaveState) EVT_MENU_RANGE(IDM_FRAMESKIP0, IDM_FRAMESKIP9, CFrame::OnFrameSkip) EVT_MENU_RANGE(IDM_DRIVE1, IDM_DRIVE24, CFrame::OnBootDrive) -EVT_MENU_RANGE(IDM_CONNECT_WIIMOTE1, IDM_CONNECT_WIIMOTE4, CFrame::OnConnectWiimote) +EVT_MENU_RANGE(IDM_CONNECT_WIIMOTE1, IDM_CONNECT_BALANCEBOARD, CFrame::OnConnectWiimote) EVT_MENU_RANGE(IDM_LISTWAD, IDM_LISTDRIVES, CFrame::GameListChanged) // Other @@ -739,6 +739,7 @@ int GetCmdForHotkey(unsigned int key) case HK_WIIMOTE2_CONNECT: return IDM_CONNECT_WIIMOTE2; case HK_WIIMOTE3_CONNECT: return IDM_CONNECT_WIIMOTE3; case HK_WIIMOTE4_CONNECT: return IDM_CONNECT_WIIMOTE4; + case HK_BALANCEBOARD_CONNECT: return IDM_CONNECT_BALANCEBOARD; case HK_LOAD_STATE_SLOT_1: return IDM_LOADSLOT1; case HK_LOAD_STATE_SLOT_2: return IDM_LOADSLOT2; @@ -823,6 +824,8 @@ void CFrame::OnKeyDown(wxKeyEvent& event) WiimoteId = 2; else if (IsHotkey(event, HK_WIIMOTE4_CONNECT)) WiimoteId = 3; + else if (IsHotkey(event, HK_BALANCEBOARD_CONNECT)) + WiimoteId = 4; else { unsigned int i = NUM_HOTKEYS; diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 8607fdb110..6a23e15d16 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -205,6 +205,7 @@ void CFrame::CreateMenu() toolsMenu->AppendCheckItem(IDM_CONNECT_WIIMOTE2, GetMenuLabel(HK_WIIMOTE2_CONNECT)); toolsMenu->AppendCheckItem(IDM_CONNECT_WIIMOTE3, GetMenuLabel(HK_WIIMOTE3_CONNECT)); toolsMenu->AppendCheckItem(IDM_CONNECT_WIIMOTE4, GetMenuLabel(HK_WIIMOTE4_CONNECT)); + toolsMenu->AppendCheckItem(IDM_CONNECT_BALANCEBOARD, GetMenuLabel(HK_BALANCEBOARD_CONNECT)); m_MenuBar->Append(toolsMenu, _("&Tools")); @@ -370,7 +371,9 @@ wxString CFrame::GetMenuLabel(int Id) Label = wxString::Format(_("Connect Wiimote %i"), Id - HK_WIIMOTE1_CONNECT + 1); break; - + case HK_BALANCEBOARD_CONNECT: + Label = _("Connect Balance Board"); + break; case HK_LOAD_STATE_SLOT_1: case HK_LOAD_STATE_SLOT_2: case HK_LOAD_STATE_SLOT_3: @@ -1570,13 +1573,14 @@ void CFrame::UpdateGUI() if (DiscIO::CNANDContentManager::Access().GetNANDLoader(TITLEID_SYSMENU).IsValid()) GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->Enable(!Initialized); - // Tools + // Tools GetMenuBar()->FindItem(IDM_CHEATS)->Enable(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE3)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Enable(RunningWii); + GetMenuBar()->FindItem(IDM_CONNECT_BALANCEBOARD)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONFIG_WIIMOTE_PLUGIN)->Enable(!RunningGamecube); if (RunningWii) { @@ -1588,6 +1592,8 @@ void CFrame::UpdateGUI() AccessWiiMote(0x0102)->IsConnected()); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Check(GetUsbPointer()-> AccessWiiMote(0x0103)->IsConnected()); + GetMenuBar()->FindItem(IDM_CONNECT_BALANCEBOARD)->Check(GetUsbPointer()-> + AccessWiiMote(0x0104)->IsConnected()); } if (Running) diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h index 144eafe40f..ded510028d 100644 --- a/Source/Core/DolphinWX/Src/Globals.h +++ b/Source/Core/DolphinWX/Src/Globals.h @@ -97,6 +97,7 @@ enum IDM_CONNECT_WIIMOTE2, IDM_CONNECT_WIIMOTE3, IDM_CONNECT_WIIMOTE4, + IDM_CONNECT_BALANCEBOARD, IDM_LISTWAD, IDM_LISTWII, diff --git a/Source/Core/DolphinWX/Src/HotkeyDlg.cpp b/Source/Core/DolphinWX/Src/HotkeyDlg.cpp index 5ee94deb59..487b310bf7 100644 --- a/Source/Core/DolphinWX/Src/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/Src/HotkeyDlg.cpp @@ -185,6 +185,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void) _("Connect Wiimote 2"), _("Connect Wiimote 3"), _("Connect Wiimote 4"), + _("Connect Balance Board"), _("Load State Slot 1"), _("Load State Slot 2"),