Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common: use Android asset compatible methods #2214

Conversation

ericoporto
Copy link
Member

@ericoporto ericoporto commented Nov 8, 2023

fixes Android error reported here https://www.adventuregamestudio.co.uk/forums/advanced-technical-forum/ogg-audio-makes-the-game-freeze-android/msg636658856/#msg636658856

In other news, I seem to have trouble building for Android on this new version. I get the following error every time I try to launch the .apk on my phone :
"AGSNative
Loading game failed with error:
Main game file not found or could not be opened.
Filename: ac2game.dta..

The game files may be incomplete, corrupt or from unsupported version of AGS."

Until I manage to fix that, I won't be able to verify that the issue is fixed in the 3.6.1....

The issue is the previously used methods can't test for file existence inside the Android asset file.

@ivan-mogilko
Copy link
Contributor

The fix is logical, and further in code FindFileCI is using DirectoryIterator, which also searches using android's aassetmanager.

What bothers me is that although Android fails this preliminary test, it could continue further and find necessary files using DirectoryIterator, but apparently does not. This means either AGS_CASE_SENSITIVE_FILESYSTEM is not defined, or something else is not working well.

@ivan-mogilko ivan-mogilko merged commit 2f02b31 into adventuregamestudio:master Nov 8, 2023
20 checks passed
@ericoporto ericoporto deleted the fix-android-not-loading-assets branch November 8, 2023 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants