添加是否运行的标致

This commit is contained in:
xsl
2025-11-12 15:05:31 +08:00
parent e23ccd75cd
commit 43b00c8446
3 changed files with 8 additions and 0 deletions
+5
View File
@@ -1261,6 +1261,11 @@ void FaceApp::SetInitArg(const char* arg)
void FaceApp::drawFrame(long long frameTime)
{
if (!_running)
{
return;
}
std::unique_lock lock(changeMotionMtx);
static long long game_time = 0;
game_time += frameTime;
+2
View File
@@ -146,6 +146,8 @@ public:
void destroyTexture(VkDevice device, Texture& texture);
void cleanupResources(VkDevice device, VmaAllocator allocator);
bool _running = false;
};
#endif
+1
View File
@@ -77,6 +77,7 @@ int main() {
FaceApp app;
app.SetInitArg(json_str.c_str());
app.initVulkan();
app._running = true;
app.mainLoop();
//try {
// app.mainLoop();