From 94cffbeb7307b8bd7e5b42fa18c50a402a23c5ac Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 19 Sep 2021 08:44:47 +0800 Subject: [PATCH] Fix swap interval mismatch when changing activity --- src/main_loop.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main_loop.cpp b/src/main_loop.cpp index f4d522913..44799b3e7 100644 --- a/src/main_loop.cpp +++ b/src/main_loop.cpp @@ -129,6 +129,7 @@ MainLoop::~MainLoop() } // ~MainLoop #ifdef MOBILE_STK +extern "C" void update_swap_interval(int swap_interval); //----------------------------------------------------------------------------- extern "C" void pause_mainloop() { @@ -168,6 +169,8 @@ extern "C" void resume_mainloop() if (World::getWorld() && RewindManager::isEnabled()) RewindManager::get()->resetSmoothNetworkBody(); Online::RequestManager::get()->setPaused(false); + // Android atm needs this to reset the swap interval when changing activity + update_swap_interval(UserConfigParams::m_swap_interval); } // resume_mainloop #endif