diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index a6fffce82..6937c038c 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -713,7 +713,6 @@ #() pFEiu -> pFEiu #() pEEip -> pEEip #() pFEiV -> pFEiV -#() pFELV -> pFELV #() pEEpi -> pEEpi #() pFEpi -> pFEpi #() pFEpu -> pFEpu @@ -3046,10 +3045,9 @@ wrappedlibx11: - XLookupKeysym - pFiV: - XVaCreateNestedList -- pFLV: - - XGetICValues - pFpV: - XCreateIC + - XGetICValues - XGetIMValues - XSetICValues - XSetIMValues diff --git a/src/wrapped32/generated/wrappedlibx11types32.h b/src/wrapped32/generated/wrappedlibx11types32.h index 9bee81556..385464f97 100644 --- a/src/wrapped32/generated/wrappedlibx11types32.h +++ b/src/wrapped32/generated/wrappedlibx11types32.h @@ -25,7 +25,6 @@ typedef int32_t (*iFpL_t)(void*, uintptr_t); typedef int32_t (*iFXp_t)(void*, void*); typedef uintptr_t (*LFpi_t)(void*, int32_t); typedef void* (*pFiV_t)(int32_t, ...); -typedef void* (*pFLV_t)(uintptr_t, ...); typedef void* (*pFpV_t)(void*, ...); typedef void* (*pFXi_t)(void*, int32_t); typedef void* (*pFXL_t)(void*, uintptr_t); @@ -119,8 +118,8 @@ typedef uintptr_t (*LFXLiiuuuiupLp_t)(void*, uintptr_t, int32_t, int32_t, uint32 GO(XPutBackEvent, iFXp_t) \ GO(XLookupKeysym, LFpi_t) \ GO(XVaCreateNestedList, pFiV_t) \ - GO(XGetICValues, pFLV_t) \ GO(XCreateIC, pFpV_t) \ + GO(XGetICValues, pFpV_t) \ GO(XGetIMValues, pFpV_t) \ GO(XSetICValues, pFpV_t) \ GO(XSetIMValues, pFpV_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index a80df58bb..7361131cc 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -807,7 +807,6 @@ typedef void* (*pFEii_t)(x64emu_t*, int32_t, int32_t); typedef void* (*pFEiu_t)(x64emu_t*, int32_t, uint32_t); typedef void* (*pEEip_t)(x64emu_t*, int32_t, void*); typedef void* (*pFEiV_t)(x64emu_t*, int32_t, void*); -typedef void* (*pFELV_t)(x64emu_t*, uintptr_t, void*); typedef void* (*pEEpi_t)(x64emu_t*, void*, int32_t); typedef void* (*pFEpi_t)(x64emu_t*, void*, int32_t); typedef void* (*pFEpu_t)(x64emu_t*, void*, uint32_t); @@ -2990,7 +2989,6 @@ void pFEii_32(x64emu_t *emu, uintptr_t fcn) { pFEii_t fn = (pFEii_t)fcn; R_EAX = void pFEiu_32(x64emu_t *emu, uintptr_t fcn) { pFEiu_t fn = (pFEiu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8))); } void pEEip_32(x64emu_t *emu, uintptr_t fcn) { pEEip_t fn = (pEEip_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); emu->libc_err = errno; } void pFEiV_32(x64emu_t *emu, uintptr_t fcn) { pFEiV_t fn = (pFEiV_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptrv(R_ESP + 8))); } -void pFELV_32(x64emu_t *emu, uintptr_t fcn) { pFELV_t fn = (pFELV_t)fcn; R_EAX = to_ptrv(fn(emu, from_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptrv(R_ESP + 8))); } void pEEpi_32(x64emu_t *emu, uintptr_t fcn) { pEEpi_t fn = (pEEpi_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); emu->libc_err = errno; } void pFEpi_32(x64emu_t *emu, uintptr_t fcn) { pFEpi_t fn = (pFEpi_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); } void pFEpu_32(x64emu_t *emu, uintptr_t fcn) { pFEpu_t fn = (pFEpu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8))); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index a2082fd0c..bfcba2e56 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -754,7 +754,6 @@ void pFEii_32(x64emu_t *emu, uintptr_t fnc); void pFEiu_32(x64emu_t *emu, uintptr_t fnc); void pEEip_32(x64emu_t *emu, uintptr_t fnc); void pFEiV_32(x64emu_t *emu, uintptr_t fnc); -void pFELV_32(x64emu_t *emu, uintptr_t fnc); void pEEpi_32(x64emu_t *emu, uintptr_t fnc); void pFEpi_32(x64emu_t *emu, uintptr_t fnc); void pFEpu_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibx11.c b/src/wrapped32/wrappedlibx11.c index 89e96bf7f..e244cd119 100644 --- a/src/wrapped32/wrappedlibx11.c +++ b/src/wrapped32/wrappedlibx11.c @@ -2745,7 +2745,7 @@ EXPORT int my32__XReply(x64emu_t* emu, void* dpy, void* rep, int extra, int disc return ret; } -EXPORT void* my32_XGetICValues(x64emu_t* emu, size_t ic, ptr_t* V) +EXPORT void* my32_XGetICValues(x64emu_t* emu, void* ic, ptr_t* V) { void* ret = NULL; while(!ret && *V) { @@ -2753,12 +2753,12 @@ EXPORT void* my32_XGetICValues(x64emu_t* emu, size_t ic, ptr_t* V) void* val = from_ptrv(V[1]); V+=2; if(!strcmp(name, "filterEvents")) { - long fevent; + unsigned long fevent; ret = my->XGetICValues(ic, name, &fevent, NULL); - if(!ret) - *(long_t*)val = to_long(fevent); - } else - { + // I got a value of 0xFFFF00000003, but this seems to be a valid + // value of KeyPressMask | KeyReleaseMask, so just silently truncate + if(!ret) *(ulong_t*)val = to_ulong_silent(fevent); + } else { printf_log_prefix(2, LOG_INFO, "Warning, unknown XGetICValues of %s\n", name); ret = my->XGetICValues(ic, name, val, NULL); } diff --git a/src/wrapped32/wrappedlibx11_private.h b/src/wrapped32/wrappedlibx11_private.h index a04c55d7b..463a07b9d 100644 --- a/src/wrapped32/wrappedlibx11_private.h +++ b/src/wrapped32/wrappedlibx11_private.h @@ -384,7 +384,7 @@ GO(XGetGeometry, iFXLbL_pppppp) GO(_XGetHostname, iFpi) GO(XGetIconName, iFXLbp_) GO(XGetIconSizes, iFXLbp_p) -GOM(XGetICValues, pFELV) // use varargs... +GOM(XGetICValues, pFEpV) // use varargs... GOM(XGetImage, pFEXLiiuuLi) // return an XImage with callbacks that needs wrapping GOM(XGetIMValues, pFEpV) GO(XGetInputFocus, iFXBL_p)