mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 18:33:03 -07:00
[Windows] Replace the GetTickCount macro with a direct System::Call
This commit is contained in:
parent
9a52b6e55d
commit
927eeb7a2a
1 changed files with 8 additions and 4 deletions
|
|
@ -281,7 +281,8 @@ Function WaitForAppToClose
|
||||||
Call CloseMatchingApps
|
Call CloseMatchingApps
|
||||||
; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so
|
; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so
|
||||||
; a bare loop counter would not bound the real wait time to 60 s.
|
; a bare loop counter would not bound the real wait time to 60 s.
|
||||||
${GetTickCount} $R8
|
System::Call 'kernel32::GetTickCount()i.s'
|
||||||
|
Pop $R8
|
||||||
ck_wait_loop:
|
ck_wait_loop:
|
||||||
Sleep 500
|
Sleep 500
|
||||||
Call IsAppRunning
|
Call IsAppRunning
|
||||||
|
|
@ -289,7 +290,8 @@ Function WaitForAppToClose
|
||||||
DetailPrint "$R1 closed."
|
DetailPrint "$R1 closed."
|
||||||
Return
|
Return
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${GetTickCount} $R9
|
System::Call 'kernel32::GetTickCount()i.s'
|
||||||
|
Pop $R9
|
||||||
IntOp $R9 $R9 - $R8
|
IntOp $R9 $R9 - $R8
|
||||||
${If} $R9 < 60000
|
${If} $R9 < 60000
|
||||||
Goto ck_wait_loop
|
Goto ck_wait_loop
|
||||||
|
|
@ -388,7 +390,8 @@ Function un.WaitForAppToClose
|
||||||
Call un.CloseMatchingApps
|
Call un.CloseMatchingApps
|
||||||
; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so
|
; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so
|
||||||
; a bare loop counter would not bound the real wait time to 60 s.
|
; a bare loop counter would not bound the real wait time to 60 s.
|
||||||
${GetTickCount} $R8
|
System::Call 'kernel32::GetTickCount()i.s'
|
||||||
|
Pop $R8
|
||||||
un_ck_wait_loop:
|
un_ck_wait_loop:
|
||||||
Sleep 500
|
Sleep 500
|
||||||
Call un.IsAppRunning
|
Call un.IsAppRunning
|
||||||
|
|
@ -396,7 +399,8 @@ Function un.WaitForAppToClose
|
||||||
DetailPrint "$R1 closed."
|
DetailPrint "$R1 closed."
|
||||||
Return
|
Return
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${GetTickCount} $R9
|
System::Call 'kernel32::GetTickCount()i.s'
|
||||||
|
Pop $R9
|
||||||
IntOp $R9 $R9 - $R8
|
IntOp $R9 $R9 - $R8
|
||||||
${If} $R9 < 60000
|
${If} $R9 < 60000
|
||||||
Goto un_ck_wait_loop
|
Goto un_ck_wait_loop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue