Undo name change for the controller list
parent
24007b00b2
commit
f60622c510
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID )
|
||||
|
||||
static const ControllerDescription_t SDL_controller_list[] = {
|
||||
static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x181a ), k_eControllerType_PS3Controller, NULL }, // Venom Arcade Stick
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3
|
||||
|
|
|
@ -59,13 +59,13 @@ EControllerType GuessControllerType( int nVID, int nPID )
|
|||
{
|
||||
s_bCheckedForDuplicates = true;
|
||||
int i, j;
|
||||
for ( i = 0; i < sizeof( SDL_controller_list ) / sizeof( SDL_controller_list[ 0 ] ); ++i )
|
||||
for ( i = 0; i < sizeof( arrControllers ) / sizeof( arrControllers[ 0 ] ); ++i )
|
||||
{
|
||||
for ( j = i + 1; j < sizeof( SDL_controller_list ) / sizeof( SDL_controller_list[ 0 ] ); ++j )
|
||||
for ( j = i + 1; j < sizeof( arrControllers ) / sizeof( arrControllers[ 0 ] ); ++j )
|
||||
{
|
||||
if ( SDL_controller_list[ i ].m_unDeviceID == SDL_controller_list[ j ].m_unDeviceID )
|
||||
if ( arrControllers[ i ].m_unDeviceID == arrControllers[ j ].m_unDeviceID )
|
||||
{
|
||||
Log( "Duplicate controller entry found for VID 0x%.4x PID 0x%.4x\n", ( SDL_controller_list[ i ].m_unDeviceID >> 16 ), SDL_controller_list[ i ].m_unDeviceID & 0xFFFF );
|
||||
Log( "Duplicate controller entry found for VID 0x%.4x PID 0x%.4x\n", ( arrControllers[ i ].m_unDeviceID >> 16 ), arrControllers[ i ].m_unDeviceID & 0xFFFF );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,11 +109,11 @@ EControllerType GuessControllerType( int nVID, int nPID )
|
|||
return k_eControllerType_UnknownNonSteamController;
|
||||
}
|
||||
|
||||
for ( iIndex = 0; iIndex < sizeof( SDL_controller_list ) / sizeof( SDL_controller_list[0] ); ++iIndex )
|
||||
for ( iIndex = 0; iIndex < sizeof( arrControllers ) / sizeof( arrControllers[0] ); ++iIndex )
|
||||
{
|
||||
if ( unDeviceID == SDL_controller_list[ iIndex ].m_unDeviceID )
|
||||
if ( unDeviceID == arrControllers[ iIndex ].m_unDeviceID )
|
||||
{
|
||||
return SDL_controller_list[ iIndex ].m_eControllerType;
|
||||
return arrControllers[ iIndex ].m_eControllerType;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ const char *GuessControllerName( int nVID, int nPID )
|
|||
{
|
||||
unsigned int unDeviceID = MAKE_CONTROLLER_ID( nVID, nPID );
|
||||
int iIndex;
|
||||
for ( iIndex = 0; iIndex < sizeof( SDL_controller_list ) / sizeof( SDL_controller_list[0] ); ++iIndex )
|
||||
for ( iIndex = 0; iIndex < sizeof( arrControllers ) / sizeof( arrControllers[0] ); ++iIndex )
|
||||
{
|
||||
if ( unDeviceID == SDL_controller_list[ iIndex ].m_unDeviceID )
|
||||
if ( unDeviceID == arrControllers[ iIndex ].m_unDeviceID )
|
||||
{
|
||||
return SDL_controller_list[ iIndex ].m_pszName;
|
||||
return arrControllers[ iIndex ].m_pszName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue