From 77698840e8cd8ad0b59d6ac1a30a7ecf418ca470 Mon Sep 17 00:00:00 2001 From: neonloop Date: Mon, 9 Jan 2023 18:03:47 +0000 Subject: Uses absolute path for core Fixes issue with instant play on FunKey S --- README.funkey-s.md | 2 +- main.c | 4 +++- main.h | 2 +- 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 -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, -- cgit v1.2.3