添加是否运行的标致
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -146,6 +146,8 @@ public:
|
||||
|
||||
void destroyTexture(VkDevice device, Texture& texture);
|
||||
void cleanupResources(VkDevice device, VmaAllocator allocator);
|
||||
|
||||
bool _running = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -77,6 +77,7 @@ int main() {
|
||||
FaceApp app;
|
||||
app.SetInitArg(json_str.c_str());
|
||||
app.initVulkan();
|
||||
app._running = true;
|
||||
app.mainLoop();
|
||||
//try {
|
||||
// app.mainLoop();
|
||||
|
||||
Reference in New Issue
Block a user