aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2023-01-09 18:03:47 +0000
committerneonloop2023-01-09 18:03:47 +0000
commit77698840e8cd8ad0b59d6ac1a30a7ecf418ca470 (patch)
tree0dd52fd717bf92c5a3270fb47e8eb2d3ab3bfe82
parent2f41e4b0dc67620b97f727e8ec278d492ded1713 (diff)
downloadpicoarch-77698840e8cd8ad0b59d6ac1a30a7ecf418ca470.tar.gz
picoarch-77698840e8cd8ad0b59d6ac1a30a7ecf418ca470.tar.bz2
picoarch-77698840e8cd8ad0b59d6ac1a30a7ecf418ca470.zip
Uses absolute path for core
Fixes issue with instant play on FunKey S
-rw-r--r--README.funkey-s.md2
-rw-r--r--main.c4
-rw-r--r--main.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/README.funkey-s.md b/README.funkey-s.md
index 2aa9626..b5a7154 100644
--- a/README.funkey-s.md
+++ b/README.funkey-s.md
@@ -53,7 +53,7 @@ The libretro documentation specifies which bios is required for each core. For e
Cheats use RetroArch .cht file format. Many cheat files are here <https://github.com/libretro/libretro-database/tree/master/cht>
-Cheat file name needs to match ROM name, and go underneath save directory. For example, `/Apps/.picoarch-gambatte/cheats/Super Mario Land (World).cht`. When a cheat file is detected, a "cheats" menu item will appear in advanced menu. Not all cheats work with all cores, may want to clean up files to just the cheats you want.
+Cheat file name needs to match ROM name, and go underneath save directory. For example, `/mnt/FunKey/.picoarch-gambatte/cheats/Super Mario Land (World).cht`. When a cheat file is detected, a "cheats" menu item will appear in advanced menu. Not all cheats work with all cores, may want to clean up files to just the cheats you want.
### IPS / BPS soft-patching
diff --git a/main.c b/main.c
index 727d6d0..925de70 100644
--- a/main.c
+++ b/main.c
@@ -592,7 +592,9 @@ int main(int argc, char **argv) {
}
if (argc > 1 && argv[1]) {
- strncpy(core_path, argv[1], sizeof(core_path) - 1);
+ if (!realpath(argv[1], &core_path)) {
+ strncpy(core_path, argv[1], sizeof(core_path) - 1);
+ }
} else {
if (menu_select_core())
quit(-1);
diff --git a/main.h b/main.h
index 1d47177..f7b4225 100644
--- a/main.h
+++ b/main.h
@@ -5,7 +5,7 @@
#include "options.h"
#include "libretro.h"
-#define MAX_PATH 512
+#define MAX_PATH PATH_MAX
typedef enum {
EACTION_NONE = 0,