From 9eb0d2f6235dc0339395fc55661c59da0e709bfa Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 13 Jul 2024 11:44:57 +0100 Subject: [PATCH] move clear back into wrapper.c remove some of the duplicate includes --- include/util.h | 1 - src/util.c | 23 +++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/include/util.h b/include/util.h index 20f919f..5840ae0 100644 --- a/include/util.h +++ b/include/util.h @@ -19,6 +19,5 @@ char *kind_as_string(char *s, int kind, int n); char *version_as_string(char *s, long v, int n); bool is_comment(char *s); struct quickcommand *command_in_quickcommands(const char *command, const struct quickcommand *quickcommands, int n); -void clear(PT_VMR vmr, bool (*f)(PT_VMR)); #endif /* __UTIL_H__ */ \ No newline at end of file diff --git a/src/util.c b/src/util.c index 92d0a46..27c3af4 100644 --- a/src/util.c +++ b/src/util.c @@ -9,18 +9,14 @@ * https://github.com/onyx-and-iris/vmrcli/blob/main/LICENSE */ -#include #include #include -#include -#include -#include "wrapper.h" #include "util.h" /** * @brief Removes the last part of a path * - * @param fullpath The entire path + * @param fullpath */ void remove_last_part_of_path(char *fullpath) { @@ -35,7 +31,7 @@ void remove_last_part_of_path(char *fullpath) /** * @brief Converts Voicemeeter's kind into a string. * - * @param s Pointer to a character buffer + * @param s Pointer to a character buffer receiving the kind * @param kind The kind of Voicemeeter. * @param n Maximum number of characters to be written to the buffer * @return char* String representation of the kind of Voicemeeter. @@ -57,7 +53,7 @@ char *kind_as_string(char *s, int kind, int n) /** * @brief Converts Voicemeeter's version into a string. * - * @param s Pointer to a character buffer + * @param s Pointer to a character buffer receiving the version * @param v Unprocessed version as a long int * @param n Maximum number of characters to be written to the buffer * @return char* String representation of the Voicemeeter version @@ -105,16 +101,3 @@ 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); -} \ No newline at end of file