about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-09-24 22:26:36 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-09-24 22:26:44 +0200
commitd7ad7f0c7097d8f5d21d3e5f657b2d46a5ca0883 (patch)
tree5c3c4af6116367355105aa15a34952929a76c8d7 /src
parentdc391439ba4b9c95eadaa9ee8c6daa2aadeff83f (diff)
downloadbox64-d7ad7f0c7097d8f5d21d3e5f657b2d46a5ca0883.tar.gz
box64-d7ad7f0c7097d8f5d21d3e5f657b2d46a5ca0883.zip
[BOX32][WRAPPING] Fixed some issue with intermediate structure conversions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped32/generated/converter32.c2
-rw-r--r--src/wrapped32/generated/functions_list.txt1
-rw-r--r--src/wrapped32/generated/wrapper32.c2
-rw-r--r--src/wrapped32/generated/wrapper32.h1
-rw-r--r--src/wrapped32/wrappedlibx11.c12
-rw-r--r--src/wrapped32/wrappedlibx11_private.h2
6 files changed, 14 insertions, 6 deletions
diff --git a/src/wrapped32/generated/converter32.c b/src/wrapped32/generated/converter32.c
index f00294df..2f0ba106 100644
--- a/src/wrapped32/generated/converter32.c
+++ b/src/wrapped32/generated/converter32.c
@@ -196,7 +196,7 @@ void to_struct_LWWWcc(ptr_t d, const struct_LWWWcc_t *src) {
 }
 void from_struct_pLiL(struct_pLiL_t *dest, ptr_t s) {
 	uint8_t* src = (uint8_t*)from_ptrv(s);
-	dest->p0 = *(void**)src; src += 4;
+	dest->p0 = from_ptrv(*(ptr_t*)src); src += 4;
 	dest->L1 = from_ulong(*(ulong_t*)src); src += 4;
 	dest->i2 = *(int*)src; src += 4;
 	dest->L3 = from_ulong(*(ulong_t*)src); src += 4;
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 9f7e013c..abf082bb 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -397,6 +397,7 @@
 #() LFpBp_i -> LFpBi
 #() pFppbp_ -> pFppB
 #() vFXLrpLiL_ -> vFXLB
+#() vFXLbpLiL_ -> vFXLB
 #() iFXLbLWWWcc_ -> iFXLB
 #() iFirLLLL_BLLLL_ -> iFiBB
 #() pFppriiiiiiiiilt_ -> pFppB
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 8aa8885c..a4e6e515 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -486,6 +486,7 @@ typedef intptr_t (*lFpBp_i_t)(void*, struct_p_t*, int32_t);
 typedef uintptr_t (*LFpBp_i_t)(void*, struct_p_t*, int32_t);
 typedef void* (*pFppbp__t)(void*, void*, struct_p_t*);
 typedef void (*vFXLrpLiL__t)(void*, uintptr_t, struct_pLiL_t*);
+typedef void (*vFXLbpLiL__t)(void*, uintptr_t, struct_pLiL_t*);
 typedef int32_t (*iFXLbLWWWcc__t)(void*, uintptr_t, struct_LWWWcc_t*);
 typedef int32_t (*iFirLLLL_BLLLL__t)(int32_t, struct_LLLL_t*, struct_LLLL_t*);
 typedef void* (*pFppriiiiiiiiilt__t)(void*, void*, struct_iiiiiiiiilt_t*);
@@ -1486,6 +1487,7 @@ void lFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { lFpBp_i_t fn = (lFpBp_i_t)fcn; s
 void LFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_i_t fn = (LFpBp_i_t)fcn; struct_p_t arg_8={0}; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void pFppbp__32(x64emu_t *emu, uintptr_t fcn) { pFppbp__t fn = (pFppbp__t)fcn; struct_p_t arg_12={0}; from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void vFXLrpLiL__32(x64emu_t *emu, uintptr_t fcn) { vFXLrpLiL__t fn = (vFXLrpLiL__t)fcn; struct_pLiL_t arg_12={0}; from_struct_pLiL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); }
+void vFXLbpLiL__32(x64emu_t *emu, uintptr_t fcn) { vFXLbpLiL__t fn = (vFXLbpLiL__t)fcn; struct_pLiL_t arg_12={0}; from_struct_pLiL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_pLiL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void iFXLbLWWWcc__32(x64emu_t *emu, uintptr_t fcn) { iFXLbLWWWcc__t fn = (iFXLbLWWWcc__t)fcn; struct_LWWWcc_t arg_12={0}; from_struct_LWWWcc(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LWWWcc(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void iFirLLLL_BLLLL__32(x64emu_t *emu, uintptr_t fcn) { iFirLLLL_BLLLL__t fn = (iFirLLLL_BLLLL__t)fcn; struct_LLLL_t arg_8={0}; from_struct_LLLL(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_LLLL_t arg_12={0}; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LLLL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void pFppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fcn) { pFppriiiiiiiiilt__t fn = (pFppriiiiiiiiilt__t)fcn; struct_iiiiiiiiilt_t arg_12={0}; from_struct_iiiiiiiiilt(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 909963a8..5991410c 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -438,6 +438,7 @@ void lFpBp_i_32(x64emu_t *emu, uintptr_t fnc);
 void LFpBp_i_32(x64emu_t *emu, uintptr_t fnc);
 void pFppbp__32(x64emu_t *emu, uintptr_t fnc);
 void vFXLrpLiL__32(x64emu_t *emu, uintptr_t fnc);
+void vFXLbpLiL__32(x64emu_t *emu, uintptr_t fnc);
 void iFXLbLWWWcc__32(x64emu_t *emu, uintptr_t fnc);
 void iFirLLLL_BLLLL__32(x64emu_t *emu, uintptr_t fnc);
 void pFppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedlibx11.c b/src/wrapped32/wrappedlibx11.c
index 2024e5b3..8691942d 100644
--- a/src/wrapped32/wrappedlibx11.c
+++ b/src/wrapped32/wrappedlibx11.c
@@ -2297,8 +2297,10 @@ EXPORT int my32_XStringListToTextProperty(x64emu_t* emu, ptr_t* list, int count,
     if(list)
         for(int i=0; i<count; ++i)
             l_list[i] = from_ptrv(list[i]);
-    //TODO: Need to wrap the XTextProperty produced?
-    return my->XStringListToTextProperty(list?(&l_list):NULL, count, text);
+    struct_pLiL_t text_l = {0};
+    int ret = my->XStringListToTextProperty(list?(&l_list):NULL, count, &text_l);
+    to_struct_pLiL(to_ptrv(text), &text_l);
+    return ret;
 }
 
 EXPORT int my32_Xutf8TextListToTextProperty(x64emu_t* emu, void* dpy, ptr_t* list, int count, uint32_t style, void* text)
@@ -2307,8 +2309,10 @@ EXPORT int my32_Xutf8TextListToTextProperty(x64emu_t* emu, void* dpy, ptr_t* lis
     if(list)
         for(int i=0; i<count; ++i)
             l_list[i] = from_ptrv(list[i]);
-    //TODO: Need to wrap the XTextProperty produced?
-    return my->Xutf8TextListToTextProperty(dpy, list?(&l_list):NULL, count, style, text);
+    struct_pLiL_t text_l = {0};
+    int ret = my->Xutf8TextListToTextProperty(dpy, list?(&l_list):NULL, count, style, &text_l);
+    to_struct_pLiL(to_ptrv(text), &text_l);
+    return ret;
 }
 
 void convert_XWindowAttributes_to_32(void* d, void* s)
diff --git a/src/wrapped32/wrappedlibx11_private.h b/src/wrapped32/wrappedlibx11_private.h
index 6e000423..ec5c1c49 100644
--- a/src/wrapped32/wrappedlibx11_private.h
+++ b/src/wrapped32/wrappedlibx11_private.h
@@ -1110,7 +1110,7 @@ GO(XSetTextProperty, vFXLrpLiL_L)
 //GO(XSetWMColormapWindows, iFpLpi)
 GOM(XSetWMHints, iFEXLp)
 GO(XSetWMIconName, vFXLrpLiL_)
-GO(XSetWMName, vFXLrpLiL_)
+GO(XSetWMName, vFXLbpLiL_)
 GOM(XSetWMNormalHints, vFEXLp)
 GOM(XSetWMProperties, vFEXLpppippp)
 GOM(XSetWMProtocols, iFEXLpi)