Fuji/Source/Drivers/XBox/MFInput_XB.cpp
HANDLE GetFirstController()
{
	MFCALLSTACK;

	HANDLE hPad = 0;
	int i;

	// Check the global gamepad state for a connected device.
	for( i = 0; i < 4; i++ )
	{
		if( dsDevices[DS_GAMEPAD].dwState & 1 << i && hPads[i] )
		{
			hPad = hPads[i];
			break;
		}
	}

	return hPad;
}
//
// Find the first connected controller.
// This could be cached and then checked only when a device change
// is detected.
//

Find the first connected controller.
This could be cached and then checked only when a device change
is detected.
Find the first connected controller . This could be cached and then checked only when a device change is detected .
HANDLE GetFirstController()
{
	MFCALLSTACK;
	HANDLE hPad = 0;
	int i;
	for( i = 0; i < 4; i++ )
	{
		if( dsDevices[DS_GAMEPAD].dwState & 1 << i && hPads[i] )
		{
			hPad = hPads[i];
			break;
		}
	}
	return hPad;
}
HANDLE GetFirstController ( ) { MFCALLSTACK ; HANDLE hPad = 0 ; int i ; for ( i = 0 ; i < 4 ; i ++ ) { if ( dsDevices [ DS_GAMEPAD ] . dwState & 1 << i && hPads [ i ] ) { hPad = hPads [ i ] ; break ; } } return hPad ; }
Find the first connected controller.
Find the first connected controller .
// Check the global gamepad state for a connected device.
