mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
[bug] fix game thread block by set wrong _loopTimeOut (#12724)
* [bug] fix game thread block by set wrong _loopTimeOut
This commit is contained in:
@@ -517,9 +517,8 @@ int AndroidPlatform::init() {
|
||||
_loopTimeOut = LOW_FREQUENCY_TIME_INTERVAL;
|
||||
_isLowFrequencyLoopEnabled = true;
|
||||
IXRInterface *xr = getInterface<IXRInterface>();
|
||||
bool isXRInstanceCreated = xr && xr->getXRConfig(xr::XRConfigKey::INSTANCE_CREATED).getBool();
|
||||
if (!isXRInstanceCreated) {
|
||||
// xr will not sleep, -1 we will block forever waiting for events.
|
||||
if (xr && !xr->getXRConfig(xr::XRConfigKey::INSTANCE_CREATED).getBool()) {
|
||||
// xr will sleep, -1 we will block forever waiting for events.
|
||||
_loopTimeOut = -1;
|
||||
_isLowFrequencyLoopEnabled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user