mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
disable gametick after enter background(revert to logic to version 3.4.2) (#11095)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user