MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / ShowLoadingGui

Method ShowLoadingGui

neo/framework/Session.cpp:542–566  ·  view source on GitHub ↗

================ idSessionLocal::ShowLoadingGui ================ */

Source from the content-addressed store, hash-verified

540================
541*/
542void idSessionLocal::ShowLoadingGui() {
543 if ( com_ticNumber == 0 ) {
544 return;
545 }
546 console->Close();
547
548 // introduced in D3XP code. don't think it actually fixes anything, but doesn't hurt either
549#if 1
550 // Try and prevent the while loop from being skipped over (long hitch on the main thread?)
551 int stop = Sys_Milliseconds() + 1000;
552 int force = 10;
553 while ( Sys_Milliseconds() < stop || force-- > 0 ) {
554 Com_UpdateFrameTime(); // DG: put updating com_frameTime into a function
555 session->Frame();
556 session->UpdateScreen( false );
557 }
558#else
559 int stop = com_ticNumber + 1000.0f / USERCMD_MSEC * 1.0f;
560 while ( com_ticNumber < stop ) {
561 com_frameTime = com_ticNumber * USERCMD_MSEC;
562 session->Frame();
563 session->UpdateScreen( false );
564 }
565#endif
566}
567
568
569

Callers

nothing calls this directly

Calls 5

Sys_MillisecondsFunction · 0.85
Com_UpdateFrameTimeFunction · 0.85
UpdateScreenMethod · 0.80
CloseMethod · 0.45
FrameMethod · 0.45

Tested by

no test coverage detected