From c6b6adc1183f6967860408daf7d6a65dc4da9bd5 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 29 Nov 2022 23:23:32 +0300
Subject: [PATCH] Mac: fixed SDL3_LIBNAME to be 'libSDL3.dylib'
See https://github.com/libsdl-org/SDL/pull/6705 (again.)
---
src/sdl2_compat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index ab290a5..d3367dc 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -138,7 +138,7 @@ static char loaderror[256];
#include <dlfcn.h>
#include <pwd.h>
#include <unistd.h>
- #define SDL3_LIBNAME "libSDL3.0.dylib"
+ #define SDL3_LIBNAME "libSDL3.dylib"
#define SDL3_FRAMEWORK "SDL3.framework/Versions/A/SDL3"
#define strcpy_fn strcpy
#define sprintf_fn sprintf
@@ -148,13 +148,13 @@ static char loaderror[256];
static SDL_bool LoadSDL3Library(void) {
/* I don't know if this is the _right_ order to try, but this seems reasonable */
static const char * const dylib_locations[] = {
- "@loader_path/" SDL3_LIBNAME, /* MyApp.app/Contents/MacOS/libSDL3.0.dylib */
+ "@loader_path/" SDL3_LIBNAME, /* MyApp.app/Contents/MacOS/libSDL3.dylib */
"@loader_path/../Frameworks/" SDL3_FRAMEWORK, /* MyApp.app/Contents/Frameworks/SDL2.framework */
- "@executable_path/" SDL3_LIBNAME, /* MyApp.app/Contents/MacOS/libSDL3.0.dylib */
+ "@executable_path/" SDL3_LIBNAME, /* MyApp.app/Contents/MacOS/libSDL3.dylib */
"@executable_path/../Frameworks/" SDL3_FRAMEWORK, /* MyApp.app/Contents/Frameworks/SDL2.framework */
NULL, /* /Users/username/Library/Frameworks/SDL2.framework */
"/Library/Frameworks" SDL3_FRAMEWORK, /* /Library/Frameworks/SDL2.framework */
- SDL3_LIBNAME /* oh well, anywhere the system can see the .dylib (/usr/local/lib or whatever) */
+ SDL3_LIBNAME /* oh well, anywhere the system can see the .dylib (/usr/local/lib or whatever) */
};
int i;