[Libretro] Add game dir as fall back for arcade BIOSes
This commit is contained in:
parent
9d4d486524
commit
f892630e4b
|
@ -205,7 +205,7 @@ static char game_dir[1024];
|
|||
char game_dir_no_slash[1024];
|
||||
char vmu_dir_no_slash[PATH_MAX];
|
||||
char content_name[PATH_MAX];
|
||||
static char g_roms_dir[PATH_MAX];
|
||||
char g_roms_dir[PATH_MAX];
|
||||
static std::mutex mtx_serialization;
|
||||
static bool gl_ctx_resetting = false;
|
||||
static bool is_dupe;
|
||||
|
|
|
@ -28,6 +28,7 @@ const char *retro_get_system_directory();
|
|||
extern char game_dir_no_slash[1024];
|
||||
extern char vmu_dir_no_slash[PATH_MAX];
|
||||
extern char content_name[PATH_MAX];
|
||||
extern char g_roms_dir[PATH_MAX];
|
||||
extern unsigned per_content_vmus;
|
||||
extern std::string arcadeFlashPath;
|
||||
|
||||
|
@ -102,10 +103,14 @@ std::string findNaomiBios(const std::string& name)
|
|||
{
|
||||
std::string basepath(game_dir_no_slash);
|
||||
basepath += path_default_slash() + name;
|
||||
if (file_exists(basepath))
|
||||
return basepath;
|
||||
else
|
||||
return "";
|
||||
if (!file_exists(basepath))
|
||||
{
|
||||
// File not found in system dir, try game dir instead
|
||||
basepath = g_roms_dir + name;
|
||||
if (!file_exists(basepath))
|
||||
return "";
|
||||
}
|
||||
return basepath;
|
||||
}
|
||||
|
||||
std::string getSavestatePath(int index, bool writable)
|
||||
|
|
Loading…
Reference in New Issue