fix njoy build for non win32 os, and small osx64 build fix

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1965 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
tmator
2009-01-20 20:21:05 +00:00
parent e6d78d3447
commit 8f2d1136a7
7 changed files with 19 additions and 7 deletions

View File

@ -229,7 +229,9 @@ std::string ShowStatus(int VirtualController)
joysticks[0].ID, joysticks[1].ID, joysticks[2].ID, joysticks[3].ID,
controllertype, triggertype,
joy0, joy1, joy2, joy3,
#ifdef _WIN32
XInput::IsConnected(0), XInput::GetXI(0, XI_TRIGGER_L), XInput::GetXI(0, XI_TRIGGER_R),
#endif
StrAxes.c_str(), StrHats.c_str(), StrBut.c_str(),
Axes, Balls, Hats, Buttons
);

View File

@ -366,7 +366,9 @@ void ConfigBox::UpdateGUI(int _notebookpage)
m_JoyShoulderL[_notebookpage]->GetValue().ToLong(&Left);
m_JoyShoulderR[_notebookpage]->GetValue().ToLong(&Right);
bool AnalogTrigger = (Left >= 1000 || Right >= 1000);
#ifdef _WIN32
bool XInput = XInput::IsConnected(0);
#endif
m_JoyDpadUp[_notebookpage]->Show(!Hat);
m_JoyDpadLeft[_notebookpage]->Show(!Hat);
@ -390,7 +392,11 @@ void ConfigBox::UpdateGUI(int _notebookpage)
m_CBShowAdvanced[_notebookpage]->SetValue(g_Config.bShowAdvanced);
// Controller type values
#ifdef _WIN32
if (!XInput) m_TriggerType[_notebookpage]->SetSelection(CTL_TRIGGER_SDL);
#else
m_TriggerType[_notebookpage]->SetSelection(CTL_TRIGGER_SDL);
#endif
// Advanced settings
m_CoBDiagonal[_notebookpage]->SetValue(wxString::FromAscii(g_Config.SDiagonal.at(_notebookpage).c_str()));

View File

@ -394,6 +394,7 @@ void ConfigBox::DoGetButtons(int GetId)
}
// Check for a XInput trigger
#ifdef _WIN32
if(XInput)
{
for(int i = 0; i <= XI_TRIGGER_R; i++)
@ -406,6 +407,7 @@ void ConfigBox::DoGetButtons(int GetId)
}
}
}
#endif
// Check for keyboard action
if (g_Pressed && Button)
@ -495,4 +497,4 @@ void ConfigBox::DoGetButtons(int GetId)
//Console::Print("IsRunning: %i\n", m_ButtonMappingTimer->IsRunning());
}
/////////////////////////////////////////////////////////// Configure button mapping
/////////////////////////////////////////////////////////// Configure button mapping