Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,16 @@ LoadScreen::~LoadScreen( void )

void LoadScreen::update( Int percent )
{
TheGameEngine->serviceWindowsOS();
TheWindowManager->update();
TheDisplay->update();
// redraw all views, update the GUI
TheDisplay->draw();
if(TheGameEngine)
TheGameEngine->serviceWindowsOS();
if(TheWindowManager)
TheWindowManager->update();
if(TheDisplay)
{
TheDisplay->update();
// redraw all views, update the GUI
TheDisplay->draw();
}

setFPMode();
}
Expand Down Expand Up @@ -1190,13 +1195,17 @@ void GameSpyLoadScreen::reset( void )

void GameSpyLoadScreen::update( Int percent )
{
if(percent <= 100)
TheNetwork->updateLoadProgress( percent );
TheNetwork->liteupdate();
if(TheNetwork)
{
if(percent <= 100)
TheNetwork->updateLoadProgress( percent );
TheNetwork->liteupdate();
}

//GadgetProgressBarSetProgress(m_progressBars[TheNetwork->getLocalPlayerID()], percent );

TheMouse->setCursorTooltip(UnicodeString::TheEmptyString);
if(TheMouse)
TheMouse->setCursorTooltip(UnicodeString::TheEmptyString);

// Do this last!
LoadScreen::update( percent );
Expand Down
35 changes: 22 additions & 13 deletions GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,21 @@ LoadScreen::~LoadScreen( void )

void LoadScreen::update( Int percent )
{
TheGameEngine->serviceWindowsOS();
if (TheGameEngine->getQuitting())
return; //don't bother with any of this if the player is exiting game.
if(TheGameEngine)
{
TheGameEngine->serviceWindowsOS();
if (TheGameEngine->getQuitting())
return; //don't bother with any of this if the player is exiting game.
}

TheWindowManager->update();
TheDisplay->update();
// redraw all views, update the GUI
TheDisplay->draw();
if(TheWindowManager)
TheWindowManager->update();
if(TheDisplay)
{
TheDisplay->update();
// redraw all views, update the GUI
TheDisplay->draw();
}

setFPMode();
}
Expand Down Expand Up @@ -1855,12 +1862,12 @@ void GameSpyLoadScreen::reset( void )

void GameSpyLoadScreen::update( Int percent )
{
if(percent <= 100)
TheNetwork->updateLoadProgress( percent );
TheNetwork->liteupdate();

if (TheNetwork != nullptr)
if(TheNetwork)
{
if(percent <= 100)
TheNetwork->updateLoadProgress( percent );
TheNetwork->liteupdate();

if (percent >= 50)
{
if (!g_bHasDoneSOGScreenshot)
Expand All @@ -1878,7 +1885,9 @@ void GameSpyLoadScreen::update( Int percent )
{
NGMP_OnlineServicesManager::GetInstance()->Tick();
}
TheMouse->setCursorTooltip(UnicodeString::TheEmptyString);

if(TheMouse)
TheMouse->setCursorTooltip(UnicodeString::TheEmptyString);

// Do this last!
LoadScreen::update( percent );
Expand Down
Loading