disable gametick after enter background(revert to logic to version 3.4.2) (#11095)

This commit is contained in:
bofeng-song
2022-05-14 18:33:36 +08:00
committed by GitHub
parent b718018467
commit a2afcd2cdb
2 changed files with 5 additions and 1 deletions
@@ -82,7 +82,9 @@ void AndroidPlatform::waitWindowInitialized() {
int32_t AndroidPlatform::loop() {
while (_jniNativeGlue->isRunning()) {
pollEvent();
runTask();
if (_jniNativeGlue->isAnimating()) {
runTask();
}
}
return 0;
}
@@ -119,6 +119,8 @@ public:
int32_t getWidth() const;
int32_t getHeight() const;
bool isAnimating() const {return _animating;}
private:
void preExecCmd(JniCommand cmd);
void engineHandleCmd(JniCommand cmd);