Fix ext mem games not working sometimes

This commit is contained in:
PabloMK7 2024-05-13 10:50:18 +02:00
parent 19a46a8712
commit a299db1429
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
VERSION_MAJOR := 1 VERSION_MAJOR := 1
VERSION_MINOR := 0 VERSION_MINOR := 0
VERSION_REVISION := 0 VERSION_REVISION := 1
all: all:
mkdir -p plugin/build mkdir -p plugin/build

View File

@ -26,7 +26,7 @@ LIBRARIES := ctru
VERSION_MAJOR := 1 VERSION_MAJOR := 1
VERSION_MINOR := 0 VERSION_MINOR := 0
VERSION_MICRO := 0 VERSION_MICRO := 1
BUILD_FLAGS := -march=armv6k -mtune=mpcore -mfloat-abi=hard BUILD_FLAGS := -march=armv6k -mtune=mpcore -mfloat-abi=hard
BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \ BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \

View File

@ -23,7 +23,7 @@ char *strdup(const char *s) {
return d; return d;
} }
FILE* fopen_mkdir(const char* name, const char* mode) FILE* fopen_mkdir(const char* name, const char* mode, bool actuallyOpen = true)
{ {
char* _path = strdup(name); char* _path = strdup(name);
char *p; char *p;
@ -40,7 +40,7 @@ FILE* fopen_mkdir(const char* name, const char* mode)
*p = '/'; *p = '/';
} }
} }
retfile = fopen(name, mode); if (actuallyOpen) retfile = fopen(name, mode);
error: error:
free(_path); free(_path);
return retfile; return retfile;
@ -78,6 +78,10 @@ bool extractPlugin() {
bool launchPlugin() { bool launchPlugin() {
// Make sure the luma plugins directory exists
// so that persistent user parameters work
fopen_mkdir("/luma/plugins/a.txt", "w", false);
u32 ret = 0; u32 ret = 0;
PluginLoadParameters plgparam = { 0 }; PluginLoadParameters plgparam = { 0 };
u8 isPlgEnabled = 0; u8 isPlgEnabled = 0;

View File

@ -16,7 +16,7 @@ SOURCES := sources sources/CTRPluginFramework
VERSION_MAJOR := 1 VERSION_MAJOR := 1
VERSION_MINOR := 0 VERSION_MINOR := 0
VERSION_REVISION := 0 VERSION_REVISION := 1
SERVER_PORT := 5543 SERVER_PORT := 5543
IP := 19 IP := 19