Skip to content

Commit

Permalink
Merge pull request #2214 from ericoporto/fix-android-not-loading-assets
Browse files Browse the repository at this point in the history
Common: use Android asset compatible methods
  • Loading branch information
ivan-mogilko authored Nov 8, 2023
2 parents bb269c7 + 3aa2667 commit 2f02b31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ bin/
gen/
out/

# ags game in Android single game project used for testing
Android/mygame/app/src/main/assets

# Ignore prebuilt libraries
Android/library/runtime/libs/

## end Android related

## Xcode Build generated
Expand Down
4 changes: 2 additions & 2 deletions Common/util/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ String File::FindFileCI(const String &base_dir, const String &file_name,
return {}; // fail, cannot be handled

// First try exact match
if ((is_dir && ags_directory_exists(test.GetCStr())) ||
(!is_dir && ags_file_exists(test.GetCStr())))
if ((is_dir && File::IsDirectory(test.GetCStr())) ||
(!is_dir && File::IsFile(test.GetCStr())))
return test; // success

#if !defined (AGS_CASE_SENSITIVE_FILESYSTEM)
Expand Down

0 comments on commit 2f02b31

Please sign in to comment.