Example #1
0
void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
{
	// Debugger::PrintDataBuffer(LogTypes::WIIMOTE, _pData, _Size, "HandleSDP: ");

	CBigEndianBuffer buffer(_pData);

	switch (buffer.Read8(0))
	{
		// SDP_ServiceSearchRequest
	case 0x02:
	{
		WARN_LOG(WII_IPC_WIIMOTE, "!!! SDP_ServiceSearchRequest !!!");

		_dbg_assert_(WII_IPC_WIIMOTE, _Size == 13);

		u16 TransactionID = buffer.Read16(1);
		u8* pServiceSearchPattern = buffer.GetPointer(5);
		u16 MaximumServiceRecordCount = buffer.Read16(10);

		SDPSendServiceSearchResponse(cid, TransactionID, pServiceSearchPattern,
			MaximumServiceRecordCount);
	}
	break;

	// SDP_ServiceAttributeRequest
	case 0x04:
	{
		WARN_LOG(WII_IPC_WIIMOTE, "!!! SDP_ServiceAttributeRequest !!!");

		u16 startAttrID, endAttrID;
		u32 offset = 1;

		u16 TransactionID = buffer.Read16(offset);
		offset += 2;
		// u16 ParameterLength = buffer.Read16(offset);
		offset += 2;
		u32 ServiceHandle = buffer.Read32(offset);
		offset += 4;
		u16 MaximumAttributeByteCount = buffer.Read16(offset);
		offset += 2;
		offset += ParseAttribList(buffer.GetPointer(offset), startAttrID, endAttrID);
		u8* pContinuationState = buffer.GetPointer(offset);

		SDPSendServiceAttributeResponse(cid, TransactionID, ServiceHandle, startAttrID, endAttrID,
			MaximumAttributeByteCount, pContinuationState);
	}
	break;

	default:
		ERROR_LOG(WII_IPC_WIIMOTE, "WIIMOTE: Unknown SDP command %x", _pData[0]);
		PanicAlert("WIIMOTE: Unknown SDP command %x", _pData[0]);
		break;
	}
}
Example #2
0
bool wxGLCanvas::Create(wxWindow *parent,
                        wxWindowID id,
                        const wxPoint& pos,
                        const wxSize& size,
                        long style,
                        const wxString& name,
                        const int *attribList,
                        const wxPalette& palette)
{
    // Separate 'GLXFBConfig/XVisual' attributes.
    // Also store context attributes for wxGLContext ctor
    wxGLAttributes dispAttrs;
    if ( ! ParseAttribList(attribList, dispAttrs, &m_GLCTXAttrs) )
        return false;

    return Create(parent, dispAttrs, id, pos, size, style, name, palette);
}