mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
NewGCPad: Sliders should be functional on DirectInput, also Axes renamed. XInput devices won't have their limited DirectInput counterparts listed. Minor cleanup, warning removal.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5260 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -371,26 +371,12 @@ void ControllerInterface::ControlQualifier::FromControl(const ControllerInterfac
|
||||
// ControlQualifier = = Device :: Control*
|
||||
//
|
||||
// check if a control qualifier matches a device control
|
||||
// if qualifier name is /.../ form, uses a regular expression match
|
||||
// also |control1|control2| form, || matches all
|
||||
//
|
||||
bool ControllerInterface::ControlQualifier::operator==(const ControllerInterface::Device::Control* const control) const
|
||||
{
|
||||
if ( name.size() )
|
||||
{
|
||||
#ifdef CIFACE_USE_REGEX
|
||||
if ( '/' == name[0] && '/' == (*name.rbegin()) ) // check if regex
|
||||
{
|
||||
wxRegEx re(
|
||||
wxString::FromAscii(name.substr( 1, name.size()-2).c_str()).Prepend(wxT("^(")).Append(wxT(")$"))
|
||||
, wxRE_ADVANCED | wxRE_EXTENDED | wxRE_NOSUB | wxRE_ICASE );
|
||||
|
||||
if ( re.IsValid() )
|
||||
return re.Matches( wxString::FromAscii( control->GetName().c_str() ) );
|
||||
else
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if ( '|' == name[0] && '|' == (*name.rbegin()) ) // check if using |button1|button2| format
|
||||
{
|
||||
return ( name.find( '|' + control->GetName() + '|' ) != name.npos || "||" == name );
|
||||
|
Reference in New Issue
Block a user