Closed orbea closed 8 years ago
I don't see how this would be an issue... there is no way for retroarch to divine the path for a game. Is somegame.zip in CWD when you run it like this? retroarch -L /usr/lib64/libretro/fba_libretro.so somegame.zip
These commands were all run from the directory containing somegame.zip, retroarch does not need to know the path.
With or without ./ really should not make any difference.
I can confirm the behavior and the error it gives is: RetroArch [libretro INFO] :: [FBA] Archive: ssf2t RetroArch [libretro ERROR] :: [FBA] Failed to find archive: /ssf2t I think the issue is in this bit: https://github.com/libretro/libretro-fba/blob/master/src/burner/libretro/libretro.cpp#L799
Likely fix:
static void extract_directory(char *buf, const char *path, size_t size)
{
strncpy(buf, path, size - 1);
buf[size - 1] = '\0';
char *base = strrchr(buf, '/');
if (!base)
base = strrchr(buf, '\\');
if (base)
*base = '\0';
else
- buf[0] = '\0';
+ {
+ buf[0] = '.';
+ buf[1] = '\0';
+ }
}
Someone test it for me, I'm lazy to dig up a FBA ROM. Or figure out whether FBA ROMs are called ROMs or something else.
Yes, that does it, after applying the below patch I can now I can start games with any of the methods. Thanks!
diff -urN a/libretro-fba/src/burner/libretro/libretro.cpp b/libretro-fba/src/burner/libretro/libretro.cpp
--- a/libretro-fba/src/burner/libretro/libretro.cpp 2016-05-01 12:41:12.441863279 -0700
+++ b/libretro-fba/src/burner/libretro/libretro.cpp 2016-05-01 12:42:44.598717305 -0700
@@ -1425,7 +1425,10 @@
if (base)
*base = '\0';
else
- buf[0] = '\0';
+ {
+ buf[0] = '.';
+ buf[1] = '\0';
+ }
}
bool retro_load_game(const struct retro_game_info *info)
Since this was committed I will close this issue, thanks for the quick resolution! https://github.com/libretro/libretro-fba/commit/e5a6ea94f878d84645587159e5d6fc75b29d57c3
OS:
Slackware64-current
RetroArch-1.3.2-x86_64-2_SBo
libretro-fba-a71055b_2016.04.25_master-x86_64-1_git
When starting a game from a terminal with out specifying a path to the game nothing happens, no error messages or anything. RetroArch just immediately quits, this is not expected behavior in any other libretro core I have tried.
What does not work:
retroarch -L /usr/lib64/libretro/fba_libretro.so somegame.zip
What does work:
retroarch -L /usr/lib64/libretro/fba_libretro.so ./somegame.zip
retroarch -L /usr/lib64/libretro/fba_libretro.so /home/orbea/game/roms/cp2/somegame.zip
Loading the core and game directly from the RetroArch menu.