Closed GreenSnakeLinux closed 2 weeks ago
Hi, my memory isn't very fresh on all this, but I know that raylib internally uses its "own version" of fopen
(see utils.c) for Android.
This might be the reason why LoadFileText
is unable to read from the directory provided by GetCacheDir
. To be verified...
Edit: But it’s normal to use "rt" to open a text file, "rt" opens a file for reading in text mode and handles newline translations, for example. Try LoadFileData
if it is not a text file otherwise.
you're right it is not related to "rt" mode but with:
I have created a pull request, to have a new read function, that does not read in Assets folder but everywhere including cache directory.
@GreenSnakeLinux I just reviewed your contribution, and aside from a few minor things to address, it looks great! Thank you again!
Completed with: https://github.com/Bigfoot71/raymob/pull/19 and https://github.com/Bigfoot71/raymob/commit/9ea2fe1f962d885839ad9c585d114c2d63d5bd7d
Thanks again @GreenSnakeLinux ! :)
Hello,
When I want to read a file in cache folder using GetCacheDir() I need to use: fopen(fileName, "r"); because LoadFileText(fileName) use mode "rt" and return "Failed to open text file" Why use "rt" ? Strangely, files open in asset folder is working with LoadFileText and mode "rt" but not with "r"