diff --git a/library/include/dfhack-c/modules/WindowIO_C.h b/library/include/dfhack-c/modules/WindowIO_C.h index 072a4f352..2051dee6a 100644 --- a/library/include/dfhack-c/modules/WindowIO_C.h +++ b/library/include/dfhack-c/modules/WindowIO_C.h @@ -32,9 +32,9 @@ distribution. extern "C" { #endif -DFHACK_EXPORT int WindowIO_TypeStr(DFHackObject* window, const char* input, int delay, bool useShift); +DFHACK_EXPORT int WindowIO_TypeStr(DFHackObject* window, const char* input, uint32_t delay, int8_t useShift); -DFHACK_EXPORT int WindowIO_TypeSpecial(DFHackObject* window, t_special command, int count, int delay); +DFHACK_EXPORT int WindowIO_TypeSpecial(DFHackObject* window, t_special command, uint32_t count, uint32_t delay); #ifdef __cplusplus } diff --git a/library/modules/WindowIO_C.cpp b/library/modules/WindowIO_C.cpp index 31c6e4739..73217a7d2 100644 --- a/library/modules/WindowIO_C.cpp +++ b/library/modules/WindowIO_C.cpp @@ -40,18 +40,23 @@ using namespace DFHack; extern "C" { #endif -int WindowIO_TypeStr(DFHackObject* window, const char* input, int delay, bool useShift) +int WindowIO_TypeStr(DFHackObject* window, const char* input, uint32_t delay, int8_t useShift) { if(window != NULL) { - ((DFHack::WindowIO*)window)->TypeStr(input, delay, useShift); + bool shifting = false; + + if(useShift > 0) + shifting = true; + + ((DFHack::WindowIO*)window)->TypeStr(input, delay, shifting); return 1; } return -1; } -int WindowIO_TypeSpecial(DFHackObject* window, t_special command, int count, int delay) +int WindowIO_TypeSpecial(DFHackObject* window, t_special command, uint32_t count, uint32_t delay) { if(window != NULL) {