From d18332baedb44efb3fec4cd1a5ee42457ae1c11e Mon Sep 17 00:00:00 2001 From: Krad Date: Thu, 12 May 2022 09:04:02 +0800 Subject: [PATCH] Fix ShimLib simulation logic. --- src/ShimLib/ShimLib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ShimLib/ShimLib.c b/src/ShimLib/ShimLib.c index 7ed4a24..e532fbf 100644 --- a/src/ShimLib/ShimLib.c +++ b/src/ShimLib/ShimLib.c @@ -39,10 +39,11 @@ void ThreadFunc(void* args){ stop_flag = 0; break; } - if (i == 20){ - WaitForSingleObject(e1, INFINITE); - } + progress = (float)i * 0.1f; + if (i == 10){ + WaitForSingleObject(e1, INFINITE); + } Sleep(300); } status = READY; @@ -73,6 +74,7 @@ int ScanControl(ScanAction actionType) { case STOP: statusCountFlag = 0; stop_flag = 1; + progress = 0.0f; status = READY; printf("Stop everything!\r\n"); break;