iOS: don't update frames in the background

This commit is contained in:
MoNTE48 2020-06-17 15:02:04 +02:00
parent 754497ede1
commit c027a6d698
3 changed files with 15 additions and 0 deletions

View File

@ -595,6 +595,11 @@ void draw_load_screen(const std::wstring &text, IrrlichtDevice* device,
gui::IGUIEnvironment* guienv, ITextureSource *tsrc,
float dtime, int percent, bool clouds)
{
#ifdef __IOS__
if (device->isWindowMinimized())
return;
#endif
video::IVideoDriver* driver = device->getVideoDriver();
v2u32 screensize = porting::getWindowSize();

View File

@ -4171,6 +4171,11 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
time_of_day_smooth = time_of_day_smooth * (1.0 - todsm)
+ time_of_day * todsm;
#ifdef __IOS__
if (device->isWindowMinimized())
return;
#endif
runData.time_of_day = time_of_day;
runData.time_of_day_smooth = time_of_day_smooth;

View File

@ -268,6 +268,11 @@ bool GUIEngine::loadMainMenuScript()
/******************************************************************************/
void GUIEngine::run()
{
#ifdef __IOS__
if (m_device->isWindowMinimized())
return;
#endif
// Always create clouds because they may or may not be
// needed based on the game selected
// NO!!!