about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibxcb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrapped/wrappedlibxcb.c')
-rw-r--r--src/wrapped/wrappedlibxcb.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibxcb.c b/src/wrapped/wrappedlibxcb.c
index 37db2eaa..0beee090 100644
--- a/src/wrapped/wrappedlibxcb.c
+++ b/src/wrapped/wrappedlibxcb.c
@@ -11,11 +11,11 @@
 #include "bridge.h"
 #include "librarian/library_private.h"
 #include "x64emu.h"
-#include "emu/x64emu_private.h"
 #include "callback.h"
 #include "librarian.h"
 #include "box64context.h"
 #include "emu/x64emu_private.h"
+#include "myalign.h"
 
 #ifdef ANDROID
 	const char* libxcbName = "libxcb.so";
@@ -25,4 +25,27 @@
 
 #define LIBNAME libxcb
 
+#define ADDED_FUNCTIONS()       \
+
+#include "generated/wrappedlibxcbtypes.h"
+
+#include "wrappercallback.h"
+
+EXPORT void* my_xcb_connect(x64emu_t* emu, void* dispname, void* screen)
+{
+	return add_xcb_connection(my->xcb_connect(dispname, screen));
+}
+
+EXPORT void my_xcb_disconnect(x64emu_t* emu, void* conn)
+{
+	my->xcb_disconnect(align_xcb_connection(conn));
+	del_xcb_connection(conn);
+}
+
+#define CUSTOM_INIT \
+    getMy(lib);
+
+#define CUSTOM_FINI \
+    freeMy();
+
 #include "wrappedlib_init.h"