当前位置: 首页>>代码示例>>C++>>正文


C++ PSPPointer::IsValid方法代码示例

本文整理汇总了C++中PSPPointer::IsValid方法的典型用法代码示例。如果您正苦于以下问题:C++ PSPPointer::IsValid方法的具体用法?C++ PSPPointer::IsValid怎么用?C++ PSPPointer::IsValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PSPPointer的用法示例。


在下文中一共展示了PSPPointer::IsValid方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WriteBuffer

	void WriteBuffer(u32 srcPtr, u32 len)
	{
		Memory::Memcpy(bufAddr + (bufSize - freeSize), srcPtr, len);
		freeSize -= len;
		if (transferredBytes.IsValid())
			*transferredBytes += len;
	}
开发者ID:libretro,项目名称:PSP1,代码行数:7,代码来源:sceKernelMsgPipe.cpp

示例2: ReadBuffer

	void ReadBuffer(u32 destPtr, u32 len)
	{
		Memory::Memcpy(destPtr, bufAddr + bufSize - freeSize, len);
		freeSize -= len;
		if (transferredBytes.IsValid())
			*transferredBytes += len;
	}
开发者ID:libretro,项目名称:PSP1,代码行数:7,代码来源:sceKernelMsgPipe.cpp

示例3:

Psmf *getPsmf(u32 psmf)
{
	PSPPointer<PsmfData> psmfstruct;
	psmfstruct = psmf;
	if (!psmfstruct.IsValid())
		return 0;
	auto iter = psmfMap.find(psmfstruct->headerOffset);
	if (iter != psmfMap.end())
		return iter->second;
	else
		return 0;
}
开发者ID:Clim15,项目名称:ppsspp,代码行数:12,代码来源:scePsmf.cpp

示例4: __CtrlReadSingleBuffer

static int __CtrlReadSingleBuffer(PSPPointer<_ctrl_data> data, bool negative)
{
	if (data.IsValid())
	{
		*data = ctrlBufs[ctrlBufRead];
		ctrlBufRead = (ctrlBufRead + 1) % NUM_CTRL_BUFFERS;

		if (negative)
			data->buttons = ~data->buttons;

		return 1;
	}

	return 0;
}
开发者ID:cloudeecn,项目名称:ppsspp,代码行数:15,代码来源:sceCtrl.cpp

示例5: sceMpegRingbufferAvailableSize

int sceMpegRingbufferAvailableSize(u32 ringbufferAddr)
{
	PSPPointer<SceMpegRingBuffer> ringbuffer;
	ringbuffer = ringbufferAddr;

	if (!ringbuffer.IsValid()) {
		ERROR_LOG(HLE, "sceMpegRingbufferAvailableSize(%08x) - bad address", ringbufferAddr);
		return -1;
	}

	MpegContext *ctx = getMpegCtx(ringbuffer->mpeg);
	if (!ctx) {
		ERROR_LOG(HLE, "sceMpegRingbufferAvailableSize(%08x) - bad mpeg", ringbufferAddr);
		return -1;
	}

	hleEatCycles(2020);
	DEBUG_LOG(HLE, "%i=sceMpegRingbufferAvailableSize(%08x)", ringbuffer->packetsFree, ringbufferAddr);
	return ringbuffer->packetsFree;
}
开发者ID:Heiji,项目名称:ppsspp,代码行数:20,代码来源:sceMpeg.cpp

示例6: if

void PSPOskDialog::ConvertUCS2ToUTF8(std::string& _string, const PSPPointer<u16_le> em_address)
{
	if (!em_address.IsValid())
	{
		_string = "";
		return;
	}

	char stringBuffer[2048];
	char *string = stringBuffer;

	auto input = em_address;
	int c;
	while ((c = *input++) != 0)
	{
		if (c < 0x80)
			*string++ = c;
		else if (c < 0x800) {
			*string++ = 0xC0 | (c >> 6);
			*string++ = 0x80 | (c & 0x3F);
		} else {
开发者ID:coestergaard,项目名称:ppsspp,代码行数:21,代码来源:PSPOskDialog.cpp

示例7: if

void PSPOskDialog::ConvertUCS2ToUTF8(std::string& _string, const PSPPointer<u16_le>& em_address)
{
	if (!em_address.IsValid())
	{
		_string = "";
		return;
	}

	const size_t maxLength = 2047;
	char stringBuffer[maxLength + 1];
	char *string = stringBuffer;

	u16_le *input = &em_address[0];
	int c;
	while ((c = *input++) != 0 && string < stringBuffer + maxLength)
	{
		if (c < 0x80)
			*string++ = c;
		else if (c < 0x800) {
			*string++ = 0xC0 | (c >> 6);
			*string++ = 0x80 | (c & 0x3F);
		} else {
开发者ID:FTPiano,项目名称:ppsspp,代码行数:22,代码来源:PSPOskDialog.cpp


注:本文中的PSPPointer::IsValid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。