Clean up code for multiple GameCube Controllers

This commit is contained in:
Braden
2012-11-11 16:38:01 -06:00
parent 00df449f89
commit ee3848d5ba
3 changed files with 22 additions and 53 deletions

View File

@ -27,7 +27,6 @@ window handle that is returned by CreateWindow() can be accessed from
Core::GetWindowHandle().
*/
#include "Setup.h" // Common
#include "NetWindow.h"
@ -99,6 +98,8 @@ extern "C" {
#include "../resources/KDE.h"
};
#include <stdio.h>
// Create menu items
// ---------------------
void CFrame::CreateMenu()
@ -699,28 +700,15 @@ void CFrame::OnRecordReadOnly(wxCommandEvent& event)
void CFrame::OnTASInput(wxCommandEvent& event)
{
if(SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_GC_CONTROLLER)
{
g_TASInputDlg->Show(true);
g_TASInputDlg->SetTitle("TAS Input - Controller 1");
}
std::string number[4] = {"1","2","3","4"};
if(SConfig::GetInstance().m_SIDevice[1] == SIDEVICE_GC_CONTROLLER)
for(int i = 0; i < 4; i++)
{
g_TASInputDlg1->Show(true);
g_TASInputDlg1->SetTitle("TAS Input - Controller 2");
}
if(SConfig::GetInstance().m_SIDevice[2] == SIDEVICE_GC_CONTROLLER)
{
g_TASInputDlg2->Show(true);
g_TASInputDlg2->SetTitle("TAS Input - Controller 3");
}
if(SConfig::GetInstance().m_SIDevice[3] == SIDEVICE_GC_CONTROLLER)
{
g_TASInputDlg3->Show(true);
g_TASInputDlg3->SetTitle("TAS Input - Controller 4");
if(SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER)
{
g_TASInputDlg[i]->Show(true);
g_TASInputDlg[i]->SetTitle("TAS Input - Controller " + number[i]);
}
}
}