diff --git a/.github/mac-bundle.sh b/.github/mac-bundle.sh index b1f4f38..a916784 100755 --- a/.github/mac-bundle.sh +++ b/.github/mac-bundle.sh @@ -44,7 +44,6 @@ PlistBuddy Tanuki3DS.app/Contents/Info.plist -c "add CFBundleDevelopmentRegion s PlistBuddy Tanuki3DS.app/Contents/Info.plist -c "add CFBundleInfoDictionaryVersion string 6.0" PlistBuddy Tanuki3DS.app/Contents/Info.plist -c "add CFBundleName string Tanuki3DS" PlistBuddy Tanuki3DS.app/Contents/Info.plist -c "add CFBundlePackageType string APPL" -PlistBuddy Tanuki3DS.app/Contents/Info.plist -c "add NSHumanReadableCopyright string Copyright 2024 Tanuki3DS Team" # Bundle dylibs dylibbundler -od -b -x Tanuki3DS.app/Contents/MacOS/ctremu -d Tanuki3DS.app/Contents/Frameworks -p @rpath diff --git a/Makefile b/Makefile index c6b521f..f41c4a7 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ LDFLAGS := -lm -lSDL2 ifeq ($(USER), 1) CFLAGS_RELEASE += -flto - CPPFLAGS += -DUSE_TFD + CPPFLAGS += -DUSE_TFD -DNOPORTABLE else LDFLAGS += -lcapstone endif diff --git a/src/main.c b/src/main.c index 0b9fc64..6c618ac 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,8 @@ -#include "tinyfiledialogs/tinyfiledialogs.h" #include #include +#include + +#include "tinyfiledialogs/tinyfiledialogs.h" #include "3ds.h" #include "emulator.h" @@ -162,6 +164,12 @@ int main(int argc, char** argv) { } #endif +#ifdef NOPORTABLE + char* prefpath = SDL_GetPrefPath("", "Tanuki3DS"); + chdir(prefpath); + SDL_free(prefpath); +#endif + if (emulator_init() < 0) { SDL_Quit(); return -1;