about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/librarian/library.c3
-rwxr-xr-xsrc/wrapped/wrappedsdl2image.c7
-rwxr-xr-xsrc/wrapped/wrappedsdl2ttf.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/src/librarian/library.c b/src/librarian/library.c
index 0e9f48cc..7ca96e0a 100755
--- a/src/librarian/library.c
+++ b/src/librarian/library.c
@@ -264,6 +264,9 @@ library_t *NewLibrary(const char* path, box64context_t* context)
         }
     }
     int notwrapped = FindInCollection(lib->name, &context->box64_emulated_libs);
+    // check if name is libSDL_sound-1.0.so.1 but with SDL2 loaded, then try emulated first...
+    if(!notwrapped && !strcmp(lib->name, "libSDL_sound-1.0.so.1") && my_context->sdl2lib)
+        notwrapped = 1;
     // And now, actually loading a library
     // look for native(wrapped) libs first
     if(!notwrapped)
diff --git a/src/wrapped/wrappedsdl2image.c b/src/wrapped/wrappedsdl2image.c
index 6c514abf..5b531167 100755
--- a/src/wrapped/wrappedsdl2image.c
+++ b/src/wrapped/wrappedsdl2image.c
@@ -153,8 +153,11 @@ const char* sdl2imageName = "libSDL2_image-2.0.so.0";
 
 #define CUSTOM_INIT \
     my_lib = lib; \
-    lib->priv.w.p2 = getSDL2ImageMy(lib); \
-    lib->altmy = strdup("my2_");
+    lib->priv.w.p2 = getSDL2ImageMy(lib);   \
+    lib->altmy = strdup("my2_");            \
+    lib->priv.w.needed = 1; \
+    lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
+    lib->priv.w.neededlibs[0] = strdup("libSDL2-2.0.so.0");
 
 #define CUSTOM_FINI \
     free(lib->priv.w.p2); \
diff --git a/src/wrapped/wrappedsdl2ttf.c b/src/wrapped/wrappedsdl2ttf.c
index 9e92b871..c0944858 100755
--- a/src/wrapped/wrappedsdl2ttf.c
+++ b/src/wrapped/wrappedsdl2ttf.c
@@ -61,7 +61,10 @@ const char* sdl2ttfName = "libSDL2_ttf-2.0.so.0";
 #define CUSTOM_INIT                     \
     my_lib = lib;                       \
     lib->altmy = strdup("my2_");        \
-    lib->priv.w.p2 = getSDL2TTFMy(lib);
+    lib->priv.w.p2 = getSDL2TTFMy(lib); \
+    lib->priv.w.needed = 1;             \
+    lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
+    lib->priv.w.neededlibs[0] = strdup("libSDL2-2.0.so.0");
 
 #define CUSTOM_FINI                     \
     free(lib->priv.w.p2);               \