Hello, i tried to create a file on android by using SDL_RWops, however pointer to the file handle is null. What could be possible reasons of that or how to fix it?
You probably need to specify a full path, where you want the file to be
written. e.g. /tmp or SDL_AndroidGetInternalStoragePath()On Fri, Jun 20, 2014 at 11:21 PM, Flash wrote:
Hello, i tried to create a file on android by using SDL_RWops, however
pointer to the file handle is null. What could be possible reasons of that
or how to fix it? Code: SDL_RWops* file = SDL_RWFromFile(“file.txt”, “wb”);
You might also need to create the directories that you are trying to
access.(e.g. /data/data/org.libsdl.app/files/ and /data/data/org.libsdl.app/
files/res/).
Jonny DOn Mon, Jun 23, 2014 at 8:12 AM, Flash wrote:
There is no problem with reading files that are included in .apk
Sam Lantinga wrote: You probably need to specify a full path, where
you want the file to be written. e.g. /tmp or
SDL_AndroidGetInternalStoragePath()
You might also need to create the directories that you are trying to access.(e.g.??/data/data/org.libsdl.app/files/ and??/data/data/org.libsdl.app/files/res/).
What if i want to edit files that are included in .apk?
There’s no way to write in asset folder?
You can do that by locating the APK and accessing it as a zip file (e.g.
using zlib)… but don’t do that! Use the user’s data directory given by
something like SDL_AndroidGetInternalStoragePath(). Store and edit files
there.
Jonny DOn Mon, Jun 23, 2014 at 1:20 PM, Flash wrote:
Jonny D wrote: You might also need to create the directories that
you are trying to access.(e.g.? /data/data/org.libsdl.app/files/
and? /data/data/org.libsdl.app/files/res/).
What if i want to edit files that are included in .apk?
There’s no way to write in asset folder?