MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / UpdateFrame

Method UpdateFrame

Source/SysPSP/Graphics/GraphicsContext.cpp:287–374  ·  view source on GitHub ↗

This is used in game

Source from the content-addressed store, hash-verified

285//
286//*****************************************************************************
287void IGraphicsContext::UpdateFrame( bool wait_for_vbl )
288{
289 DAEDALUS_PROFILE( "IGraphicsContext::UpdateFrame" );
290
291 void * p_back;
292
293 if(gDoubleDisplayEnabled)
294 {
295 #ifdef DAEDALUS_ENABLE_ASSERTS
296 DAEDALUS_ASSERT( sceGuFinish() < DLISTSIZE , "PSP Dlist Overflow" );
297 #else
298 sceGuFinish();
299 //u32 num = sceGuFinish();
300 //if( num > DLISTSIZE ) DLDebugger_RequestDebug();
301 //printf("Dlist size %d bytes\n", num);
302 #endif
303 }
304
305 sceGuSync(0,0);
306
307 //Used for GUI menu to slow things down, in game we skip this
308 if(wait_for_vbl)
309 {
310 sceDisplayWaitVblankStart();
311 }
312
313 if( PSP_TV_LACED )
314 {
315 u32 src = (u32)MAKE_UNCACHED_PTR((void*)LACED_DRAW);
316 u32 dst = (u32)MAKE_UNCACHED_PTR((void*)LACED_DISP);
317
318 sceGuStart(GU_DIRECT,ilist);
319 sceGuCopyImage(SCR_MODE, 0, 0, 720, 240, 768*2, reinterpret_cast< void * >(src + 768*4), 0, 0, 768, reinterpret_cast< void * >(dst));
320 sceGuTexSync();
321 sceGuCopyImage(SCR_MODE, 0, 0, 720, 240, 768*2, reinterpret_cast< void * >(src), 0, 0, 768, reinterpret_cast< void * >(dst + 768*262*4));
322 sceGuTexSync();
323 sceGuFinish();
324 sceGuSync(0,0);
325 p_back = mpBuffers[ 0 ]; // back buffer always draw_buffer on interlaced
326 }
327 else
328 {
329 p_back = sceGuSwapBuffers();
330 }
331
332 if( mDumpNextScreen )
333 {
334 mDumpNextScreen--;
335 if (!mDumpNextScreen)
336 {
337 if(gTakeScreenshotSS) // We are taking a screenshot for savestate
338 {
339 gTakeScreenshotSS = false;
340 StoreSaveScreenData();
341
342 }
343 else
344 {

Callers 7

Patch_RecurseAndFindFunction · 0.45
RunMethod · 0.45
UpdateScreenMethod · 0.45
~IUIContextMethod · 0.45
EndRenderMethod · 0.45
OpenMethod · 0.45
DLDebugger_ProcessFunction · 0.45

Calls 1

c32Class · 0.50

Tested by

no test coverage detected