Browse Source

fix(CAPI): 🐛 fix wrong frame count

tags/0.1.0
DragonAura 2 years ago
parent
commit
fdfc7911a7
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      CAPI/cpp/API/src/logic.cpp
  2. +1
    -0
      CAPI/python/PyAPI/logic.py

+ 1
- 0
CAPI/cpp/API/src/logic.cpp View File

@@ -618,6 +618,7 @@ void Logic::LoadBuffer(const protobuf::MessageToClient& message)
{ {
std::lock_guard<std::mutex> lock(mtxState); std::lock_guard<std::mutex> lock(mtxState);
std::swap(currentState, bufferState); std::swap(currentState, bufferState);
counterState = counterBuffer;
logger->info("Update State!"); logger->info("Update State!");
} }
freshed = true; freshed = true;


+ 1
- 0
CAPI/python/PyAPI/logic.py View File

@@ -476,6 +476,7 @@ class Logic(ILogic):
if Setting.asynchronous(): if Setting.asynchronous():
with self.__mtxState: with self.__mtxState:
self.__currentState, self.__bufferState = self.__bufferState, self.__currentState self.__currentState, self.__bufferState = self.__bufferState, self.__currentState
self.__counterState = self.__counterBuffer
self.__logger.info("Update state!") self.__logger.info("Update state!")
self.__freshed = True self.__freshed = True
else: else:


Loading…
Cancel
Save