コード例 #1
0
void GLES_GPU::BeginFrame()
{
	if (g_Config.bDisplayFramebuffer && displayFramebufPtr_)
	{
		INFO_LOG(HLE, "Drawing the framebuffer");
		u8 *pspframebuf = Memory::GetPointer((0x44000000)|(displayFramebufPtr_ & 0x1FFFFF));	// TODO - check
		DisplayDrawer_DrawFramebuffer(pspframebuf, displayFormat_, displayStride_);
	}
	currentRenderVfb_ = 0;
}
コード例 #2
0
ファイル: sceDisplay.cpp プロジェクト: Ryalian/ppsspp
void hleEnterVblank(u64 userdata, int cyclesLate)
{
	int vbCount = userdata;

	DEBUG_LOG(HLE, "Enter VBlank %i", vbCount);

	isVblank = 1;

	// Wake up threads waiting for VBlank
	__KernelTriggerWait(WAITTYPE_VBLANK, 0, true);

	// Trigger VBlank interrupt handlers.
	__TriggerInterrupt(PSP_VBLANK_INTR);

	CoreTiming::ScheduleEvent(msToCycles(vblankMs) - cyclesLate, leaveVblankEvent, vbCount+1);

	// TODO: Should this be done here or in hleLeaveVblank?
	if (framebufIsLatched) 
	{
		DEBUG_LOG(HLE, "Setting latched framebuffer %08x (prev: %08x)", latchedFramebuf.topaddr, framebuf.topaddr);
		framebuf = latchedFramebuf;
		framebufIsLatched = false;
	}

	// Yeah, this has to be the right moment to end the frame. Should possibly blit the right buffer
	// depending on what's set in sceDisplaySetFramebuf, in order to support half-framerate games -
	// an initial hack could be to NOT end the frame if the buffer didn't change? that should work okay.
	{
		host->EndFrame();

		host->BeginFrame();
		if (g_Config.bDisplayFramebuffer)
		{
			INFO_LOG(HLE, "Drawing the framebuffer");
			DisplayDrawer_DrawFramebuffer(framebuf.pspframebuf, framebuf.pspFramebufFormat, framebuf.pspFramebufLinesize);
		}

		shaderManager.DirtyShader();
		shaderManager.DirtyUniform(DIRTY_ALL);
	}

	// TODO: Find a way to tell the CPU core to stop emulating here, when running on Android.
}