mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Simplify find_last_slash for non-WIN32
This commit is contained in:
parent
985ed6cd2b
commit
64f9477ef6
@ -400,15 +400,17 @@ void fill_pathname_noext(char *out_path, const char *in_path,
|
||||
|
||||
char *find_last_slash(const char *str)
|
||||
{
|
||||
const char *slash = strrchr(str, '/');
|
||||
#ifdef _WIN32
|
||||
const char *slash = strrchr(str, '/');
|
||||
const char *backslash = strrchr(str, '\\');
|
||||
|
||||
if (backslash && ((slash && backslash > slash) || !slash))
|
||||
return (char*)backslash;
|
||||
#endif
|
||||
|
||||
return (char*)slash;
|
||||
#else
|
||||
return (char*)strrchr(str, '/');
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user