添加是否运行的标致
This commit is contained in:
@@ -1261,6 +1261,11 @@ void FaceApp::SetInitArg(const char* arg)
|
|||||||
|
|
||||||
void FaceApp::drawFrame(long long frameTime)
|
void FaceApp::drawFrame(long long frameTime)
|
||||||
{
|
{
|
||||||
|
if (!_running)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_lock lock(changeMotionMtx);
|
std::unique_lock lock(changeMotionMtx);
|
||||||
static long long game_time = 0;
|
static long long game_time = 0;
|
||||||
game_time += frameTime;
|
game_time += frameTime;
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ public:
|
|||||||
|
|
||||||
void destroyTexture(VkDevice device, Texture& texture);
|
void destroyTexture(VkDevice device, Texture& texture);
|
||||||
void cleanupResources(VkDevice device, VmaAllocator allocator);
|
void cleanupResources(VkDevice device, VmaAllocator allocator);
|
||||||
|
|
||||||
|
bool _running = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ int main() {
|
|||||||
FaceApp app;
|
FaceApp app;
|
||||||
app.SetInitArg(json_str.c_str());
|
app.SetInitArg(json_str.c_str());
|
||||||
app.initVulkan();
|
app.initVulkan();
|
||||||
|
app._running = true;
|
||||||
app.mainLoop();
|
app.mainLoop();
|
||||||
//try {
|
//try {
|
||||||
// app.mainLoop();
|
// app.mainLoop();
|
||||||
|
|||||||
Reference in New Issue
Block a user