mirror of https://github.com/PCSX2/pcsx2.git
Patches: Make cheats_ws.zip search case insensitive
This commit is contained in:
parent
66c6c2400a
commit
43b53df0a0
|
@ -82,13 +82,13 @@ template<typename T>
|
||||||
static inline std::optional<T> ReadFileInZipToContainer(zip_t* zip, const char* name)
|
static inline std::optional<T> ReadFileInZipToContainer(zip_t* zip, const char* name)
|
||||||
{
|
{
|
||||||
std::optional<T> ret;
|
std::optional<T> ret;
|
||||||
const zip_int64_t file_index = zip_name_locate(zip, name, 0);
|
const zip_int64_t file_index = zip_name_locate(zip, name, ZIP_FL_NOCASE);
|
||||||
if (file_index >= 0)
|
if (file_index >= 0)
|
||||||
{
|
{
|
||||||
zip_stat_t zst;
|
zip_stat_t zst;
|
||||||
if (zip_stat_index(zip, file_index, 0, &zst) == 0)
|
if (zip_stat_index(zip, file_index, ZIP_FL_NOCASE, &zst) == 0)
|
||||||
{
|
{
|
||||||
zip_file_t* zf = zip_fopen_index(zip, file_index, 0);
|
zip_file_t* zf = zip_fopen_index(zip, file_index, ZIP_FL_NOCASE);
|
||||||
if (zf)
|
if (zf)
|
||||||
{
|
{
|
||||||
ret = T();
|
ret = T();
|
||||||
|
|
Loading…
Reference in New Issue