=============== idSessionLocal::UpdateScreen =============== */
| 2598 | =============== |
| 2599 | */ |
| 2600 | void idSessionLocal::UpdateScreen( bool outOfSequence ) { |
| 2601 | D3P_ScopedCPUSample(Session_UpdateScreen); |
| 2602 | #ifdef _WIN32 |
| 2603 | |
| 2604 | if ( com_editors ) { |
| 2605 | if ( !Sys_IsWindowVisible() ) { |
| 2606 | return; |
| 2607 | } |
| 2608 | } |
| 2609 | #endif |
| 2610 | |
| 2611 | if ( insideUpdateScreen ) { |
| 2612 | return; |
| 2613 | // common->FatalError( "idSessionLocal::UpdateScreen: recursively called" ); |
| 2614 | } |
| 2615 | |
| 2616 | insideUpdateScreen = true; |
| 2617 | |
| 2618 | // if this is a long-operation update and we are in windowed mode, |
| 2619 | // release the mouse capture back to the desktop |
| 2620 | if ( outOfSequence ) { |
| 2621 | Sys_GrabMouseCursor( false ); |
| 2622 | } |
| 2623 | |
| 2624 | D3P_BeginCPUSample(Render_BeginFrame); |
| 2625 | renderSystem->BeginFrame( renderSystem->GetScreenWidth(), renderSystem->GetScreenHeight() ); |
| 2626 | D3P_EndCPUSample(Render_BeginFrame); |
| 2627 | |
| 2628 | // draw everything |
| 2629 | Draw(); |
| 2630 | |
| 2631 | D3P_BeginCPUSample(Render_EndFrame); |
| 2632 | if ( com_speeds.GetBool() ) { |
| 2633 | renderSystem->EndFrame( &time_frontend, &time_backend ); |
| 2634 | } else { |
| 2635 | renderSystem->EndFrame( NULL, NULL ); |
| 2636 | } |
| 2637 | D3P_EndCPUSample(Render_EndFrame); |
| 2638 | |
| 2639 | insideUpdateScreen = false; |
| 2640 | } |
| 2641 | |
| 2642 | /* |
| 2643 | =============== |
no test coverage detected