From fdfc7911a7d7a233d26c200209c64f02bbc3744d Mon Sep 17 00:00:00 2001 From: DragonAura Date: Tue, 25 Apr 2023 18:20:09 +0800 Subject: [PATCH] fix(CAPI): :bug: fix wrong frame count --- CAPI/cpp/API/src/logic.cpp | 1 + CAPI/python/PyAPI/logic.py | 1 + 2 files changed, 2 insertions(+) diff --git a/CAPI/cpp/API/src/logic.cpp b/CAPI/cpp/API/src/logic.cpp index 13c174b..c06eb09 100644 --- a/CAPI/cpp/API/src/logic.cpp +++ b/CAPI/cpp/API/src/logic.cpp @@ -618,6 +618,7 @@ void Logic::LoadBuffer(const protobuf::MessageToClient& message) { std::lock_guard lock(mtxState); std::swap(currentState, bufferState); + counterState = counterBuffer; logger->info("Update State!"); } freshed = true; diff --git a/CAPI/python/PyAPI/logic.py b/CAPI/python/PyAPI/logic.py index 65af3bb..b3763c6 100644 --- a/CAPI/python/PyAPI/logic.py +++ b/CAPI/python/PyAPI/logic.py @@ -476,6 +476,7 @@ class Logic(ILogic): if Setting.asynchronous(): with self.__mtxState: self.__currentState, self.__bufferState = self.__bufferState, self.__currentState + self.__counterState = self.__counterBuffer self.__logger.info("Update state!") self.__freshed = True else: