padsimple: now shows only which xpads are connected (when the config is called), set all pads to keyboard as default, got rid of XINPUT_ENABLE #ifdefs, made the trigger buttons enabled at 200/255 instead of 20/255 :) hopefully that's a lot closer to how a gc controller acts.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@832 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2008-10-11 00:23:26 +00:00
parent 92f661b390
commit 540539ee27
2 changed files with 25 additions and 34 deletions

View File

@ -20,6 +20,7 @@
#include "../PadSimple.h"
#ifdef _WIN32
#include "XInput.h"
#include "../DirectInputBase.h"
DInput m_dinput;
@ -142,14 +143,21 @@ void ConfigDialog::CreateGUIControls()
m_Disable[i]->SetValue(pad[i].disable);
m_Rumble[i]->SetValue(pad[i].rumble);
m_Rumble[i]->Enable(!pad[i].keyboard);
// This should be considered TEMPORARY until polling x360 pads is implemented
m_DeviceName[i]->Append(_("Keyboard"));
m_DeviceName[i]->Append(_("XPAD1"));
m_DeviceName[i]->Append(_("XPAD2"));
m_DeviceName[i]->Append(_("XPAD3"));
m_DeviceName[i]->Append(_("XPAD4"));
m_DeviceName[i]->Append(_("Keyboard"));
#ifdef _WIN32
// Add connected XPads
for (int x = 0; x < 4; x++)
{
XINPUT_STATE xstate;
DWORD xresult = XInputGetState(x, &xstate);
if (xresult == ERROR_SUCCESS)
{
m_DeviceName[i]->Append(wxString::Format("XPad %i", x+1));
}
}
#endif
sDeviceTop[i]->Add(m_DeviceName[i], 1, wxEXPAND|wxALL, 1);
sDeviceTop[i]->Add(m_Attached[i], 0, wxEXPAND|wxALL, 1);
sDeviceBottom[i]->AddStretchSpacer(1);