mirror of
https://github.com/ptitSeb/box64.git
synced 2025-05-09 00:21:32 +08:00
[BOX32][WRAPPER] Added 32bits wrapped libx11-xcb
This commit is contained in:
parent
ed7dddc3d8
commit
f4a4bdd006
@ -834,6 +834,7 @@ if(BOX32)
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedlibxxf86vm.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedxinerama.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedexpat.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedlibx11xcb.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedudev0.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedudev1.c"
|
||||
"${BOX64_ROOT}/src/wrapped32/wrappedlibuuid.c"
|
||||
|
@ -59,6 +59,9 @@ GO("libXss.so.1", libxss)
|
||||
GO("libXxf86vm.so.1", libxxf86vm)
|
||||
GO("libXinerama.so.1", xinerama)
|
||||
|
||||
GO("libX11-xcb.so.1", libx11xcb)
|
||||
GO("libX11-xcb.so", libx11xcb)
|
||||
|
||||
GO("libopenal.so.1", openal)
|
||||
GO("libopenal.so.0", openal)
|
||||
GO("libopenal.so", openal)
|
||||
|
@ -179,6 +179,7 @@
|
||||
#() vFpp -> vFpp
|
||||
#() vESp -> vESp
|
||||
#() vFXi -> vFXi
|
||||
#() vFXu -> vFXu
|
||||
#() vFXL -> vFXL
|
||||
#() vFXp -> vFXp
|
||||
#() cFpp -> cFpp
|
||||
@ -2613,6 +2614,9 @@ wrappedlibx11:
|
||||
- XGetWindowProperty
|
||||
- LFXLiiuuuiupLp:
|
||||
- XCreateWindow
|
||||
wrappedlibx11xcb:
|
||||
- pFX:
|
||||
- XGetXCBConnection
|
||||
wrappedlibxcomposite:
|
||||
wrappedlibxcursor:
|
||||
- vFp:
|
||||
|
8
src/wrapped32/generated/wrappedlibx11xcbdefs32.h
Normal file
8
src/wrapped32/generated/wrappedlibx11xcbdefs32.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*********************************************************************
|
||||
* File automatically generated by rebuild_wrappers_32.py (v0.0.2.2) *
|
||||
*********************************************************************/
|
||||
#ifndef __wrappedlibx11xcbDEFS32_H_
|
||||
#define __wrappedlibx11xcbDEFS32_H_
|
||||
|
||||
|
||||
#endif // __wrappedlibx11xcbDEFS32_H_
|
19
src/wrapped32/generated/wrappedlibx11xcbtypes32.h
Normal file
19
src/wrapped32/generated/wrappedlibx11xcbtypes32.h
Normal file
@ -0,0 +1,19 @@
|
||||
/*********************************************************************
|
||||
* File automatically generated by rebuild_wrappers_32.py (v0.0.2.2) *
|
||||
*********************************************************************/
|
||||
#ifndef __wrappedlibx11xcbTYPES32_H_
|
||||
#define __wrappedlibx11xcbTYPES32_H_
|
||||
|
||||
#ifndef LIBNAME
|
||||
#error You should only #include this file inside a wrapped*.c file
|
||||
#endif
|
||||
#ifndef ADDED_FUNCTIONS
|
||||
#define ADDED_FUNCTIONS()
|
||||
#endif
|
||||
|
||||
typedef void* (*pFX_t)(void*);
|
||||
|
||||
#define SUPER() ADDED_FUNCTIONS() \
|
||||
GO(XGetXCBConnection, pFX_t)
|
||||
|
||||
#endif // __wrappedlibx11xcbTYPES32_H_
|
8
src/wrapped32/generated/wrappedlibx11xcbundefs32.h
Normal file
8
src/wrapped32/generated/wrappedlibx11xcbundefs32.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*********************************************************************
|
||||
* File automatically generated by rebuild_wrappers_32.py (v0.0.2.2) *
|
||||
*********************************************************************/
|
||||
#ifndef __wrappedlibx11xcbUNDEFS32_H_
|
||||
#define __wrappedlibx11xcbUNDEFS32_H_
|
||||
|
||||
|
||||
#endif // __wrappedlibx11xcbUNDEFS32_H_
|
@ -270,6 +270,7 @@ typedef void (*vEpp_t)(void*, void*);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void (*vESp_t)(void*, void*);
|
||||
typedef void (*vFXi_t)(void*, int32_t);
|
||||
typedef void (*vFXu_t)(void*, uint32_t);
|
||||
typedef void (*vFXL_t)(void*, uintptr_t);
|
||||
typedef void (*vFXp_t)(void*, void*);
|
||||
typedef int8_t (*cFpp_t)(void*, void*);
|
||||
@ -2042,6 +2043,7 @@ void vEpp_32(x64emu_t *emu, uintptr_t fcn) { vEpp_t fn = (vEpp_t)fcn; errno = em
|
||||
void vFpp_32(x64emu_t *emu, uintptr_t fcn) { vFpp_t fn = (vFpp_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
|
||||
void vESp_32(x64emu_t *emu, uintptr_t fcn) { vESp_t fn = (vESp_t)fcn; errno = emu->libc_err; fn(io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8)); emu->libc_err = errno; }
|
||||
void vFXi_32(x64emu_t *emu, uintptr_t fcn) { vFXi_t fn = (vFXi_t)fcn; fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
|
||||
void vFXu_32(x64emu_t *emu, uintptr_t fcn) { vFXu_t fn = (vFXu_t)fcn; fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8)); }
|
||||
void vFXL_32(x64emu_t *emu, uintptr_t fcn) { vFXL_t fn = (vFXL_t)fcn; fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8))); }
|
||||
void vFXp_32(x64emu_t *emu, uintptr_t fcn) { vFXp_t fn = (vFXp_t)fcn; fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8)); }
|
||||
void cFpp_32(x64emu_t *emu, uintptr_t fcn) { cFpp_t fn = (cFpp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
|
||||
|
@ -220,6 +220,7 @@ void vEpp_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpp_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vESp_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFXi_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFXu_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFXL_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFXp_32(x64emu_t *emu, uintptr_t fnc);
|
||||
void cFpp_32(x64emu_t *emu, uintptr_t fnc);
|
||||
|
35
src/wrapped32/wrappedlibx11xcb.c
Normal file
35
src/wrapped32/wrappedlibx11xcb.c
Normal file
@ -0,0 +1,35 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "wrapper32.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x64emu.h"
|
||||
#include "callback.h"
|
||||
#include "librarian.h"
|
||||
#include "box32context.h"
|
||||
#include "emu/x64emu_private.h"
|
||||
#include "myalign32.h"
|
||||
|
||||
static const char* libx11xcbName = "libX11-xcb.so.1";
|
||||
#define ALTNAME "libX11-xcb.so"
|
||||
#define LIBNAME libx11xcb
|
||||
|
||||
#define ADDED_FUNCTIONS() \
|
||||
|
||||
#include "generated/wrappedlibx11xcbtypes32.h"
|
||||
|
||||
#include "wrappercallback32.h"
|
||||
|
||||
EXPORT void* my32_XGetXCBConnection(x64emu_t* emu, void* a)
|
||||
{
|
||||
return add_xcb_connection32(my->XGetXCBConnection(a));
|
||||
}
|
||||
|
||||
#include "wrappedlib_init32.h"
|
6
src/wrapped32/wrappedlibx11xcb_private.h
Normal file
6
src/wrapped32/wrappedlibx11xcb_private.h
Normal file
@ -0,0 +1,6 @@
|
||||
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
|
||||
#error meh!
|
||||
#endif
|
||||
|
||||
GOM(XGetXCBConnection, pFEX)
|
||||
GO(XSetEventQueueOwner, vFXu)
|
Loading…
x
Reference in New Issue
Block a user