Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/wrapped32/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@
#() pFEiu -> pFEiu
#() pEEip -> pEEip
#() pFEiV -> pFEiV
#() pFELV -> pFELV
#() pEEpi -> pEEpi
#() pFEpi -> pFEpi
#() pFEpu -> pFEpu
Expand Down Expand Up @@ -3046,10 +3045,9 @@ wrappedlibx11:
- XLookupKeysym
- pFiV:
- XVaCreateNestedList
- pFLV:
- XGetICValues
- pFpV:
- XCreateIC
- XGetICValues
- XGetIMValues
- XSetICValues
- XSetIMValues
Expand Down
3 changes: 1 addition & 2 deletions src/wrapped32/generated/wrappedlibx11types32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) \
Expand Down
2 changes: 0 additions & 2 deletions src/wrapped32/generated/wrapper32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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))); }
Expand Down
1 change: 0 additions & 1 deletion src/wrapped32/generated/wrapper32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/wrapped32/wrappedlibx11.c
Original file line number Diff line number Diff line change
Expand Up @@ -2745,20 +2745,20 @@ 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) {
char* name = from_ptrv(V[0]);
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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/wrapped32/wrappedlibx11_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading