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


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

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


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

示例1: DoState

void MetaFileSystem::DoState(PointerWrap &p)
{
	std::lock_guard<std::recursive_mutex> 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);
	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);
}
开发者ID:333rich333,项目名称:citra,代码行数:25,代码来源:meta_file_system.cpp

示例2: __AudioDoState

void __AudioDoState(PointerWrap &p) {
	auto s = p.Section("sceAudio", 1);
	if (!s)
		return;

	p.Do(eventAudioUpdate);
	CoreTiming::RestoreRegisterEvent(eventAudioUpdate, "AudioUpdate", &hleAudioUpdate);
	p.Do(eventHostAudioUpdate);
	CoreTiming::RestoreRegisterEvent(eventHostAudioUpdate, "AudioUpdateHost", &hleHostAudioUpdate);

	p.Do(mixFrequency);

	{
		lock_guard guard(section);
		outAudioQueue.DoState(p);
	}

	int chanCount = ARRAY_SIZE(chans);
	p.Do(chanCount);
	if (chanCount != ARRAY_SIZE(chans))
	{
		ERROR_LOG(SCEAUDIO, "Savestate failure: different number of audio channels.");
		return;
	}
	for (int i = 0; i < chanCount; ++i)
		chans[i].DoState(p);
}
开发者ID:Fordi,项目名称:ppsspp,代码行数:27,代码来源:__sceAudio.cpp

示例3: DoState

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

	if (s < 2) {
		if (!g_RemasterMode)
			g_MemorySize = RAM_NORMAL_SIZE;
		g_PSPModel = PSP_MODEL_FAT;
	} else {
		u32 oldMemorySize = g_MemorySize;
		p.Do(g_PSPModel);
		p.DoMarker("PSPModel");
		if (!g_RemasterMode) {
			g_MemorySize = g_PSPModel == PSP_MODEL_FAT ? RAM_NORMAL_SIZE : RAM_DOUBLE_SIZE;
			if (oldMemorySize < g_MemorySize) {
				Shutdown();
				Init();
			}
		}
	}

	p.DoArray(GetPointer(PSP_GetKernelMemoryBase()), g_MemorySize);
	p.DoMarker("RAM");

	p.DoArray(m_pVRAM, VRAM_SIZE);
	p.DoMarker("VRAM");
	p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
	p.DoMarker("ScratchPad");
}
开发者ID:ANR2ME,项目名称:ppsspp,代码行数:31,代码来源:MemMap.cpp

示例4: DoState

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

		// Gotta do CoreTiming first since we'll restore into it.
		CoreTiming::DoState(p);

		// Memory is a bit tricky when jit is enabled, since there's emuhacks in it.
		if (MIPSComp::jit && p.mode == p.MODE_WRITE)
		{
			auto blocks = MIPSComp::jit->GetBlockCache();
			auto saved = blocks->SaveAndClearEmuHackOps();
			Memory::DoState(p);
			blocks->RestoreSavedEmuHackOps(saved);
		}
		else
			Memory::DoState(p);

		MemoryStick_DoState(p);
		currentMIPS->DoState(p);
		HLEDoState(p);
		__KernelDoState(p);
		// Kernel object destructors might close open files, so do the filesystem last.
		pspFileSystem.DoState(p);
	}
开发者ID:716Girl,项目名称:ppsspp,代码行数:27,代码来源:SaveState.cpp

示例5: DoState

void DoState(PointerWrap &p)
{
	std::lock_guard<std::recursive_mutex> lk(externalEventSection);

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

	int n = (int) event_types.size();
	p.Do(n);
	// These (should) be filled in later by the modules.
	event_types.resize(n, EventType(AntiCrashCallback, "INVALID EVENT"));

	p.DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoState>(first, (Event **) NULL);
	p.DoLinkedList<BaseEvent, GetNewTsEvent, FreeTsEvent, Event_DoState>(tsFirst, &tsLast);

	p.Do(CPU_HZ);
	p.Do(slicelength);
	p.Do(globalTimer);
	p.Do(idledCycles);

	if (s >= 2) {
		p.Do(lastGlobalTimeTicks);
		p.Do(lastGlobalTimeUs);
	} else {
		lastGlobalTimeTicks = 0;
		lastGlobalTimeUs = 0;
	}
}
开发者ID:18859966862,项目名称:ppsspp,代码行数:29,代码来源:CoreTiming.cpp

示例6: DoState

void PSPSaveDialog::DoState(PointerWrap &p) {
	JoinIOThread();
	PSPDialog::DoState(p);

	auto s = p.Section("PSPSaveDialog", 1, 2);
	if (!s) {
		return;
	}

	p.Do(display);
	param.DoState(p);
	p.Do(request);
	// Just reset it.
	bool hasParam = param.GetPspParam() != NULL;
	p.Do(hasParam);
	if (hasParam) {
		param.SetPspParam(&request);
	}
	p.Do(requestAddr);
	p.Do(currentSelectedSave);
	p.Do(yesnoChoice);
	if (s > 2) {
		p.Do(ioThreadStatus);
	} else {
		ioThreadStatus = SAVEIO_NONE;
	}
}
开发者ID:AdmiralCurtiss,项目名称:ppsspp,代码行数:27,代码来源:PSPSaveDialog.cpp

示例7: DoState

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

	// pspParam is handled in PSPSaveDialog.
	p.Do(selectedSave);
	p.Do(saveDataListCount);
	p.Do(saveNameListDataCount);
	if (p.mode == p.MODE_READ)
	{
		if (saveDataList != NULL)
			delete [] saveDataList;
		if (saveDataListCount != 0)
		{
			saveDataList = new SaveFileInfo[saveDataListCount];
			p.DoArray(saveDataList, saveDataListCount);
		}
		else
			saveDataList = NULL;
	}
	else
		p.DoArray(saveDataList, saveDataListCount);
}
开发者ID:KuroGami,项目名称:ppsspp,代码行数:25,代码来源:SavedataParam.cpp

示例8: DoState

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

	p.Do(videoCodec);
	p.Do(videoStreamNum);
	p.Do(audioCodec);
	p.Do(audioStreamNum);
	p.Do(playMode);
	p.Do(playSpeed);

	p.Do(displayBuffer);
	p.Do(displayBufferSize);
	p.Do(playbackThreadPriority);
	p.Do(psmfMaxAheadTimestamp);
	p.Do(psmfPlayerLastTimestamp);
	p.DoClass(mediaengine);
	p.Do(filehandle);
	p.Do(fileoffset);
	p.Do(readSize);
	p.Do(streamSize);

	p.Do(status);
	p.Do(psmfPlayerAvcAu);
}
开发者ID:BogsyP,项目名称:ppsspp,代码行数:26,代码来源:scePsmf.cpp

示例9: __CtrlDoState

void __CtrlDoState(PointerWrap &p)
{
    std::lock_guard<std::recursive_mutex> guard(ctrlMutex);

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

    p.Do(analogEnabled);
    p.Do(ctrlLatchBufs);
    p.Do(ctrlOldButtons);

    p.DoVoid(ctrlBufs, sizeof(ctrlBufs));
    p.Do(ctrlCurrent);
    p.Do(ctrlBuf);
    p.Do(ctrlBufRead);
    p.Do(latch);

    p.Do(ctrlIdleReset);
    p.Do(ctrlIdleBack);

    p.Do(ctrlCycle);

    SceUID dv = 0;
    p.Do(waitingThreads, dv);

    p.Do(ctrlTimer);
    CoreTiming::RestoreRegisterEvent(ctrlTimer, "CtrlSampleTimer", __CtrlTimerUpdate);
}
开发者ID:GustavoFalleiros,项目名称:ppsspp,代码行数:29,代码来源:sceCtrl.cpp

示例10: DoState

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

	p.Do(m_videoStream);
	p.Do(m_audioStream);

	p.DoArray(m_mpegheader, sizeof(m_mpegheader));

	p.Do(m_ringbuffersize);

	u32 hasloadStream = m_pdata != NULL;
	p.Do(hasloadStream);
	if (hasloadStream && p.mode == p.MODE_READ)
		loadStream(m_mpegheader, 2048, m_ringbuffersize);
#ifdef USE_FFMPEG
	u32 hasopencontext = m_pFormatCtx != NULL;
#else
	u32 hasopencontext = false;
#endif
	p.Do(hasopencontext);
	if (hasopencontext && p.mode == p.MODE_READ)
		openContext();
	if (m_pdata)
		m_pdata->DoState(p);
	if (m_demux)
		m_demux->DoState(p);

	p.Do(m_videopts);
	p.Do(m_audiopts);

	p.Do(m_isVideoEnd);
	p.Do(m_noAudioData);
}
开发者ID:Versus9,项目名称:ppsspp,代码行数:35,代码来源:MediaEngine.cpp

示例11: DoState

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

		p.Do(ringAddr_);
	}
开发者ID:GustavoFalleiros,项目名称:ppsspp,代码行数:7,代码来源:sceMpeg.cpp

示例12: __UtilityDoState

void __UtilityDoState(PointerWrap &p) {
	auto s = p.Section("sceUtility", 1, 2);
	if (!s) {
		return;
	}

	p.Do(currentDialogType);
	p.Do(currentDialogActive);
	saveDialog.DoState(p);
	msgDialog.DoState(p);
	oskDialog.DoState(p);
	netDialog.DoState(p);
	screenshotDialog.DoState(p);
	gamedataInstallDialog.DoState(p);

	if (s >= 2) {
		p.Do(currentlyLoadedModules);
	} else {
		std::set<int> oldModules;
		p.Do(oldModules);
		for (auto it = oldModules.begin(), end = oldModules.end(); it != end; ++it) {
			currentlyLoadedModules[*it] = 0;
		}
	}
}
开发者ID:AdmiralCurtiss,项目名称:ppsspp,代码行数:25,代码来源:sceUtility.cpp

示例13: __AACDoState

void __AACDoState(PointerWrap &p) {
	auto s = p.Section("sceAAC", 0, 1);
	if (!s)
		return;

	p.Do(aacMap);
}
开发者ID:Bigpet,项目名称:ppsspp,代码行数:7,代码来源:sceMp4.cpp

示例14: DoState

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

	p.Do(startPos);
	p.Do(endPos);
	p.Do(AuBuf);
	p.Do(AuBufSize);
	p.Do(PCMBuf);
	p.Do(PCMBufSize);
	p.Do(freq);
	p.Do(SumDecodedSamples);
	p.Do(LoopNum);
	p.Do(Channels);
	p.Do(MaxOutputSample);
	p.Do(readPos);
	p.Do(audioType);
	p.Do(BitRate);
	p.Do(SamplingRate);
	p.Do(askedReadSize);
	int dummy = 0;
	p.Do(dummy);
	p.Do(FrameNum);

	if (p.mode == p.MODE_READ) {
		decoder = new SimpleAudio(audioType);
		AuBufAvailable = 0; // reset to read from file at position readPos
	}
}
开发者ID:hrydgard,项目名称:ppsspp,代码行数:30,代码来源:SimpleAudioDec.cpp

示例15: __VaudioDoState

void __VaudioDoState(PointerWrap &p) {
	auto s = p.Section("sceVaudio", 1);
	if (!s)
		return;

	p.Do(vaudioReserved);
}
开发者ID:libretro,项目名称:PSP1,代码行数:7,代码来源:sceVaudio.cpp


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