aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorneonloop2023-01-09 18:03:47 +0000
committerneonloop2023-01-09 18:03:47 +0000
commit77698840e8cd8ad0b59d6ac1a30a7ecf418ca470 (patch)
tree0dd52fd717bf92c5a3270fb47e8eb2d3ab3bfe82 /main.c
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
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
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);