mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-08 21:01:08 +00:00
(file_path.c) Get rid of rhash.h dependency
This commit is contained in:
parent
aa282c5780
commit
7bcb3d4f27
@ -40,10 +40,6 @@
|
||||
#include <compat/posix_string.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_COMPRESSION
|
||||
#include <rhash.h>
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
|
||||
#ifndef S_ISDIR
|
||||
@ -135,9 +131,6 @@ bool path_contains_compressed_file(const char *path)
|
||||
return (strchr(path,'#') != NULL);
|
||||
}
|
||||
|
||||
#define FILE_EXT_7Z 0x005971d6U
|
||||
#define FILE_EXT_ZIP 0x0b88c7d8U
|
||||
|
||||
/**
|
||||
* path_is_compressed_file:
|
||||
* @path : path
|
||||
@ -150,19 +143,16 @@ bool path_is_compressed_file(const char* path)
|
||||
{
|
||||
#ifdef HAVE_COMPRESSION
|
||||
const char* file_ext = path_get_extension(path);
|
||||
uint32_t file_ext_hash = djb2_calculate(file_ext);
|
||||
|
||||
switch (file_ext_hash)
|
||||
{
|
||||
#ifdef HAVE_7ZIP
|
||||
case FILE_EXT_7Z:
|
||||
return true;
|
||||
if (!strcmp(file_ext, "zip"))
|
||||
return true;
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
case FILE_EXT_ZIP:
|
||||
return true;
|
||||
|
||||
#ifdef HAVE_7ZIP
|
||||
if (!strcmp(file_ext, "7z"))
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user