mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2026-04-07 17:33:33 +00:00
move clear intil util.c
This commit is contained in:
14
src/util.c
14
src/util.c
@@ -13,6 +13,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include "wrapper.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -104,3 +105,16 @@ struct quickcommand *command_in_quickcommands(const char *command_key, const str
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Continuously polls an is_{}dirty function until it clears.
|
||||
*
|
||||
* @param vmr Pointer to the iVMR interface
|
||||
* @param f Pointer to a polling function
|
||||
*/
|
||||
void clear(PT_VMR vmr, bool (*f)(PT_VMR))
|
||||
{
|
||||
Sleep(30);
|
||||
while (f(vmr))
|
||||
Sleep(1);
|
||||
}
|
||||
Reference in New Issue
Block a user