mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2024-11-22 23:39:50 +00:00
Get rid of IsAbsolutePath
This commit is contained in:
parent
2f6ebddd6c
commit
bea0ff8f85
@ -22,6 +22,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "general.h"
|
||||
@ -29,22 +31,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
static bool IsAbsolutePath(const char *path)
|
||||
{
|
||||
if (path[0] == '\\' || path[0] == '/')
|
||||
return(TRUE);
|
||||
|
||||
#if defined(_WIN32) || defined(DOS)
|
||||
if((path[0] >= 'a' && path[0] <= 'z') || (path[0] >= 'A' && path[0] <= 'Z'))
|
||||
{
|
||||
if(path[1] == ':')
|
||||
return(TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
void MDFN_GetFilePathComponents(const std::string &file_path,
|
||||
std::string *dir_path_out, std::string *file_base_out,
|
||||
std::string *file_ext_out)
|
||||
@ -107,7 +93,7 @@ std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_pat
|
||||
char slash = '/';
|
||||
#endif
|
||||
|
||||
if(IsAbsolutePath(rel_path.c_str()))
|
||||
if(path_is_absolute(rel_path.c_str()))
|
||||
return(rel_path);
|
||||
return(dir_path + slash + rel_path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user