Fixed CI build

This commit is contained in:
vcaesar 2022-01-31 23:41:31 -08:00
parent 2502329583
commit 4599d66f5b
3 changed files with 6 additions and 8 deletions

7
key.go
View File

@ -307,9 +307,10 @@ func checkKeyCodes(k string) (key C.MMKeyCode, err error) {
}
if len(k) == 1 {
val := C.CString(k)
key = C.keyCodeForChar(*val)
C.free(unsafe.Pointer(val))
val1 := C.CString(k)
defer C.free(unsafe.Pointer(val1))
key = C.keyCodeForChar(*val1)
if key == C.K_NOT_A_KEY {
err = keyErr
return

View File

@ -1,5 +1,5 @@
#include "keypress.h"
// #include "../base/deadbeef_rand_c.h"
#include "../base/deadbeef_rand_c.h"
#include "../base/microsleep.h"
#include <ctype.h> /* For isupper() */

View File

@ -1,8 +1,5 @@
#include "mouse.h"
// #include "../screen/screen.h"
// #include "../screen/screen_c.h"
#include "../base/deadbeef_rand_c.h"
// #include "../deadbeef_rand.h"
#include "../base/deadbeef_rand.h"
#include "../base/microsleep.h"
#include <math.h> /* For floor() */