about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedsdl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrapped/wrappedsdl2.c')
-rwxr-xr-xsrc/wrapped/wrappedsdl2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c
index 9f02e549..6de8b907 100755
--- a/src/wrapped/wrappedsdl2.c
+++ b/src/wrapped/wrappedsdl2.c
@@ -173,12 +173,12 @@ static void* find_eventfilter_Fct(void* fct)
 static void* reverse_eventfilter_Fct(void* fct)
 {
     if(!fct) return fct;
-    if(CheckBridged(my_context->sdl2lib->priv.w.bridge, fct))
-        return (void*)CheckBridged(my_context->sdl2lib->priv.w.bridge, fct);
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
     #define GO(A) if(my_eventfilter_##A == fct) return (void*)my_eventfilter_fct_##A;
     SUPER()
     #undef GO
-    return (void*)AddBridge(my_context->sdl2lib->priv.w.bridge, iFpp, fct, 0, NULL);
+    return (void*)AddBridge(my_lib->w.bridge, iFpp, fct, 0, NULL);
 }
 
 // LogOutput
@@ -206,12 +206,12 @@ static void* find_LogOutput_Fct(void* fct)
 static void* reverse_LogOutput_Fct(void* fct)
 {
     if(!fct) return fct;
-    if(CheckBridged(my_context->sdl2lib->priv.w.bridge, fct))
-        return (void*)CheckBridged(my_context->sdl2lib->priv.w.bridge, fct);
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
     #define GO(A) if(my_LogOutput_##A == fct) return (void*)my_LogOutput_fct_##A;
     SUPER()
     #undef GO
-    return (void*)AddBridge(my_context->sdl2lib->priv.w.bridge, vFpiip, fct, 0, NULL);
+    return (void*)AddBridge(my_lib->w.bridge, vFpiip, fct, 0, NULL);
 }
 
 #undef SUPER
@@ -532,14 +532,14 @@ static int get_sdl_priv(x64emu_t* emu, const char *sym_str, void **w, void **f)
         else if (strcmp(#sym, sym_str) == 0) \
         { \
             *w = _w; \
-            *f = dlsym(emu->context->sdl2lib->priv.w.lib, #sym); \
+            *f = dlsym(emu->context->sdl2lib->w.lib, #sym); \
             return *f != NULL; \
         }
     #define GO2(sym, _w, sym2) \
         else if (strcmp(#sym, sym_str) == 0) \
         { \
             *w = _w; \
-            *f = dlsym(emu->context->sdl2lib->priv.w.lib, #sym2); \
+            *f = dlsym(emu->context->sdl2lib->w.lib, #sym2); \
             return *f != NULL; \
         }
     #define GOM(sym, _w) \
@@ -575,7 +575,7 @@ int EXPORT my2_SDL_DYNAPI_entry(x64emu_t* emu, uint32_t version, uintptr_t *tabl
             void *w = NULL; \
             void *f = NULL; \
             if (get_sdl_priv(emu, #sym, &w, &f)) { \
-                table[i] = AddCheckBridge(my_context->sdl2lib->priv.w.bridge, w, f, 0, #sym); \
+                table[i] = AddCheckBridge(my_lib->w.bridge, w, f, 0, #sym); \
             } \
             else \
                 table[i] = (uintptr_t)NULL; \
@@ -847,7 +847,7 @@ EXPORT void* my2_SDL_Vulkan_GetVkGetInstanceProcAddr(x64emu_t* emu)
         emu->context->vkprocaddress = (vkprocaddess_t)my->SDL_Vulkan_GetVkGetInstanceProcAddr();
 
     if(emu->context->vkprocaddress)
-        return (void*)AddCheckBridge(my_context->sdl2lib->priv.w.bridge, pFEpp, my_vkGetInstanceProcAddr, 0, "vkGetInstanceProcAddr");
+        return (void*)AddCheckBridge(my_lib->w.bridge, pFEpp, my_vkGetInstanceProcAddr, 0, "vkGetInstanceProcAddr");
     return NULL;
 }
 
@@ -888,9 +888,9 @@ EXPORT void my2_SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, uint16_t *vend, u
     if(my_glhandle) my_dlclose(thread_get_emu(), my_glhandle);  \
     my_glhandle = NULL;                                         \
     freeMy();                                                   \
-    ((box64context_t*)(lib->context))->sdl2lib = NULL;          \
-    ((box64context_t*)(lib->context))->sdl2allocrw = NULL;      \
-    ((box64context_t*)(lib->context))->sdl2freerw = NULL;
+    my_context->sdl2lib = NULL;                                 \
+    my_context->sdl2allocrw = NULL;                             \
+    my_context->sdl2freerw = NULL;
 
 
 #include "wrappedlib_init.h"