about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibusb1.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-05-07 22:13:56 +0800
committerGitHub <noreply@github.com>2023-05-07 16:13:56 +0200
commit9f38e81735b10668d64974033b4bb5097219ee34 (patch)
tree57827cc130a3e79a46c58f4e5ce8946c78f4131a /src/wrapped/wrappedlibusb1.c
parent47ecde75ec19a58f458c1131ec1968d11d58e7e1 (diff)
downloadbox64-9f38e81735b10668d64974033b4bb5097219ee34.tar.gz
box64-9f38e81735b10668d64974033b4bb5097219ee34.zip
[WRAPPER] Used RunFunctionFmt for better sign-extend handling (#768)
* [WRAPPER] Used RunFunctionFmt for better sign-extend handling

* [WRAPPER] Fixed some typos

* [WRAPPER] Use L for unsigned long for better portability

* [WRAPPER] More replace from U to L
Diffstat (limited to 'src/wrapped/wrappedlibusb1.c')
-rwxr-xr-xsrc/wrapped/wrappedlibusb1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wrapped/wrappedlibusb1.c b/src/wrapped/wrappedlibusb1.c
index e34f440f..38bef8ff 100755
--- a/src/wrapped/wrappedlibusb1.c
+++ b/src/wrapped/wrappedlibusb1.c
@@ -45,7 +45,7 @@ GO(9)   \
 static uintptr_t my_hotplug_fct_##A = 0;                                                    \
 static int my_hotplug_##A(void* ctx, void* device, int event, void* data)                   \
 {                                                                                           \
-    return (int)RunFunction(my_context, my_hotplug_fct_##A, 4, ctx, device, event, data);   \
+    return (int)RunFunctionFmt(my_context, my_hotplug_fct_##A, "ppip", ctx, device, event, data);   \
 }
 SUPER()
 #undef GO
@@ -67,7 +67,7 @@ static void* findhotplugFct(void* fct)
 static uintptr_t my_transfert_fct_##A = 0;                      \
 static void my_transfert_##A(void* ctx)                         \
 {                                                               \
-    RunFunction(my_context, my_transfert_fct_##A, 1, ctx);      \
+    RunFunctionFmt(my_context, my_transfert_fct_##A, "p", ctx);      \
 }
 SUPER()
 #undef GO
@@ -139,7 +139,7 @@ EXPORT int my_libusb_submit_transfer(x64emu_t* emu, my_libusb_transfer_t* t)
 {
     t->callback = findtransfertFct(t->callback);
     return my->libusb_submit_transfer(t); // don't put back callback, it's unknown if it's safe
-} 
+}
 
 EXPORT int my_libusb_cancel_transfer(x64emu_t* emu, my_libusb_transfer_t* t)
 {