diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-04-05 09:43:58 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-04-05 09:43:58 +0200 |
| commit | c18a969ad0f68eea5d253693c447a860391ead4b (patch) | |
| tree | 87d270ddc6d58a9d51629d7deeae9f1ef0873af7 /src | |
| parent | 4882f8f70ebdffcf7de311d9f807102be0f25563 (diff) | |
| download | box64-c18a969ad0f68eea5d253693c447a860391ead4b.tar.gz box64-c18a969ad0f68eea5d253693c447a860391ead4b.zip | |
Fixed some bugs on my__XVa* x11 wrapping (might help #265)
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wrapped/wrappedlibx11.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/wrapped/wrappedlibx11.c b/src/wrapped/wrappedlibx11.c index a24f5028..6818d47e 100755 --- a/src/wrapped/wrappedlibx11.c +++ b/src/wrapped/wrappedlibx11.c @@ -630,14 +630,14 @@ default: break; \ } -#define GO(A) \ -if (getVArgs(emu, 1, va, i) && strcmp((char*)getVArgs(emu, 1, va, i), A) == 0) { \ - XICCallback* origin = (XICCallback*)va[i+1]; \ - XICCallback* new = callbacks + i; \ - new->client_data = origin->client_data; \ - my_XICProc_fct_##A = (uintptr_t)origin->callback; \ - new->callback = my_XICProc_##A; \ - new_va[i+1] = new; \ +#define GO(A) \ +if (new_va[i] && strcmp((char*)new_va[i], A) == 0) { \ + XICCallback* origin = (XICCallback*)new_va[i+1]; \ + XICCallback* new = callbacks + i; \ + new->client_data = origin->client_data; \ + my_XICProc_fct_##A = (uintptr_t)origin->callback; \ + new->callback = my_XICProc_##A; \ + new_va[i+1] = new; \ } EXPORT void* my_XVaCreateNestedList(x64emu_t* emu, int unused, uintptr_t* va) { @@ -712,14 +712,14 @@ EXPORT void* my_XSetIMValues(x64emu_t* emu, void* xim, uintptr_t* va) { void** new_va = malloc(sizeof(void*) * n); XIMCallback* callbacks = (XIMCallback*)malloc(sizeof(XIMCallback) * n); - #define GO(A) \ - if (getVArgs(emu, 1, va, i) && strcmp((char*)getVArgs(emu, 1, va, i), A) == 0) { \ - XIMCallback* origin = (XIMCallback*)va[i+1]; \ - XIMCallback* new = callbacks + i; \ - new->client_data = origin->client_data; \ - my_XIMProc_fct_##A = (uintptr_t)origin->callback; \ - new->callback = my_XIMProc_##A; \ - new_va[i+1] = new; \ + #define GO(A) \ + if (new_va[i] && strcmp((char*)new_va[i], A) == 0) { \ + XIMCallback* origin = (XIMCallback*)new_va[i+1]; \ + XIMCallback* new = callbacks + i; \ + new->client_data = origin->client_data; \ + my_XIMProc_fct_##A = (uintptr_t)origin->callback; \ + new->callback = my_XIMProc_##A; \ + new_va[i+1] = new; \ } for (int i = 0; i < n; i += 2) { new_va[i] = (void*)getVArgs(emu, 1, va, i); |