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


C++ PointerWrap::SetError方法代码示例

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


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

示例1: DoState

void MetaFileSystem::DoState(PointerWrap &p)
{
	lock_guard guard(lock);

	auto s = p.Section("MetaFileSystem", 1);
	if (!s)
		return;

	p.Do(current);

	// Save/load per-thread current directory map
	p.Do(currentDir);

	u32 n = (u32) fileSystems.size();
	p.Do(n);
	bool skipPfat0 = false;
	if (n != (u32) fileSystems.size())
	{
		if (n == (u32) fileSystems.size() - 1) {
			skipPfat0 = true;
		} else {
			p.SetError(p.ERROR_FAILURE);
			ERROR_LOG(FILESYS, "Savestate failure: number of filesystems doesn't match.");
			return;
		}
	}

	for (u32 i = 0; i < n; ++i) {
		if (!skipPfat0 || fileSystems[i].prefix != "pfat0:") {
			fileSystems[i].system->DoState(p);
		}
	}
}
开发者ID:elsonLee,项目名称:ppsspp,代码行数:33,代码来源:MetaFileSystem.cpp

示例2: __KernelDoState

void __KernelDoState(PointerWrap &p)
{
	std::string git_version = PPSSPP_GIT_VERSION;
	p.Do(git_version);
	if (git_version != PPSSPP_GIT_VERSION)
	{
		p.SetError(p.ERROR_WARNING);
		WARN_LOG(HLE, "Warning: this savestate was generated by a different version of PPSSPP.  It may not load properly.");
	}

	p.Do(kernelRunning);
	kernelObjects.DoState(p);
	p.DoMarker("KernelObjects");

	__InterruptsDoState(p);
	// Memory needs to be after kernel objects, which may free kernel memory.
	__KernelMemoryDoState(p);
	__KernelThreadingDoState(p);
	__KernelAlarmDoState(p);
	__KernelVTimerDoState(p);
	__KernelEventFlagDoState(p);
	__KernelMbxDoState(p);
	__KernelModuleDoState(p);
	__KernelMutexDoState(p);
	__KernelSemaDoState(p);
	__KernelTimeDoState(p);

	__AtracDoState(p);
	__AudioDoState(p);
	__CtrlDoState(p);
	__DisplayDoState(p);
	__FontDoState(p);
	__GeDoState(p);
	__ImposeDoState(p);
	__IoDoState(p);
	__MpegDoState(p);
	__NetDoState(p);
	__PowerDoState(p);
	__PsmfDoState(p);
	__PsmfPlayerDoState(p);
	__RtcDoState(p);
	__SasDoState(p);
	__SslDoState(p);
	__UmdDoState(p);
	__UtilityDoState(p);
	__UsbDoState(p);
	__VaudioDoState(p);

	__PPGeDoState(p);

	__InterruptsDoStateLate(p);
	__KernelThreadingDoStateLate(p);
}
开发者ID:CPkmn,项目名称:ppsspp,代码行数:53,代码来源:sceKernel.cpp

示例3: DoState

void KernelObjectPool::DoState(PointerWrap &p)
{
	auto s = p.Section("KernelObjectPool", 1);
	if (!s)
		return;

	int _maxCount = maxCount;
	p.Do(_maxCount);

	if (_maxCount != maxCount)
	{
		p.SetError(p.ERROR_FAILURE);
		ERROR_LOG(SCEKERNEL, "Unable to load state: different kernel object storage.");
		return;
	}

	if (p.mode == p.MODE_READ)
	{
		hleCurrentThreadName = NULL;
		kernelObjects.Clear();
	}

	p.Do(nextID);
	p.DoArray(occupied, maxCount);
	for (int i = 0; i < maxCount; ++i)
	{
		if (!occupied[i])
			continue;

		int type;
		if (p.mode == p.MODE_READ)
		{
			p.Do(type);
			pool[i] = CreateByIDType(type);

			// Already logged an error.
			if (pool[i] == NULL)
				return;

			pool[i]->uid = i + handleOffset;
		}
		else
		{
			type = pool[i]->GetIDType();
			p.Do(type);
		}
		pool[i]->DoState(p);
		if (p.error >= p.ERROR_FAILURE)
			break;
	}
}
开发者ID:JakotsuTheOne,项目名称:ppsspp,代码行数:51,代码来源:sceKernel.cpp

示例4: DoState

void VFSFileSystem::DoState(PointerWrap &p) {
	// Note: used interchangeably with DirectoryFileSystem for flash0:, so we use the same name.
	auto s = p.Section("DirectoryFileSystem", 0, 2);
	if (!s)
		return;

	u32 num = (u32) entries.size();
	p.Do(num);

	if (num != 0) {
		p.SetError(p.ERROR_WARNING);
		ERROR_LOG(FILESYS, "FIXME: Open files during savestate, could go badly.");
	}
}
开发者ID:BrainDamage,项目名称:libretro-ppsspp,代码行数:14,代码来源:DirectoryFileSystem.cpp

示例5: __InterruptsDoState

void __InterruptsDoState(PointerWrap &p)
{
    int numInterrupts = PSP_NUMBER_INTERRUPTS;
    p.Do(numInterrupts);
    if (numInterrupts != PSP_NUMBER_INTERRUPTS)
    {
        p.SetError(p.ERROR_FAILURE);
        ERROR_LOG(HLE, "Savestate failure: wrong number of interrupts, can't load.");
        return;
    }

    intState.DoState(p);
    PendingInterrupt pi(0, 0);
    p.Do(pendingInterrupts, pi);
    p.Do(interruptsEnabled);
    p.Do(inInterrupt);
    p.Do(threadBeforeInterrupt);
    p.DoMarker("sceKernelInterrupt");
}
开发者ID:ThreeHT,项目名称:ppsspp,代码行数:19,代码来源:sceKernelInterrupt.cpp

示例6: DoState

void MetaFileSystem::DoState(PointerWrap &p)
{
	p.Do(current);

	// Save/load per-thread current directory map
	p.Do(currentDir);

	u32 n = (u32) fileSystems.size();
	p.Do(n);
	if (n != (u32) fileSystems.size())
	{
		p.SetError(p.ERROR_FAILURE);
		ERROR_LOG(FILESYS, "Savestate failure: number of filesystems doesn't match.");
		return;
	}

	for (u32 i = 0; i < n; ++i)
		fileSystems[i].system->DoState(p);

	p.DoMarker("MetaFileSystem");
}
开发者ID:Darth1701,项目名称:ppsspp,代码行数:21,代码来源:MetaFileSystem.cpp

示例7: DoState

void VFSFileSystem::DoState(PointerWrap &p) {
	if (!entries.empty()) {
		p.SetError(p.ERROR_WARNING);
		ERROR_LOG(FILESYS, "FIXME: Open files during savestate, could go badly.");
	}
}
开发者ID:Alwayssnarky,项目名称:ppsspp,代码行数:6,代码来源:DirectoryFileSystem.cpp


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