Ejemplo n.º 1
0
int32_t CellInputFacade::UpdateDevice(uint8_t id)
{
	int32_t ret = 0;

	// get pad info
#ifdef PS3_SDK_3_41
	ret = cellPadGetInfo2 ( &PadInfo);
#else
	ret = cellPadGetInfo ( &PadInfo);
#endif

	if(ret != CELL_PAD_OK )
	{
		return false;
	}

#ifdef PS3_SDK_3_41
	ret = PadInfo.port_status[id];
#else
	ret = PadInfo.status[id];
#endif
	if (ret == CELL_PAD_STATUS_CONNECTED)
	{
		// backup the old data
		memcpy(&_oldPadData[id], &_newPadData[id], sizeof(CellPadData));

		// get new pad data
		ret = cellPadGetData( id, &_newPadData[id] );
	}

	return ret;
}
Ejemplo n.º 2
0
uint32_t CellInputFacade::NumberPadsConnected()
{
#ifdef PS3_SDK_3_41
	cellPadGetInfo2 ( &PadInfo);
#else
	cellPadGetInfo ( &PadInfo);
#endif
	return PadInfo.now_connect;
}
Ejemplo n.º 3
0
//-----------------------------------------------------------------------------
// Description: Platform specific input update
// Parameters: 
// Returns:
// Notes:
//-----------------------------------------------------------------------------
void FWInput::platformUpdate()
{
	// update pad connection status
	cellPadGetInfo(&sPadInfo);
	// update keybd connection status
	cellKbGetInfo(&sKeybdInfo);
	// update mouse connection status
	cellMouseGetInfo(&sMouseInfo);
}