[physfs] Why not search program abs path when add archives?
fy
fy0748 at gmail.com
Tue Nov 27 09:14:51 EST 2012
My code:
PHYSFS_init(argv[0]);
PHYSFS_addToSearchPath("Content/Audio.zip", 1);
if (PHYSFS_exists("bgm1.mp3")) {
cout<<"test"<<endl;
}
If I start my program when current work directory is the program's path,
it's OK, and print "test".
But if not, it didn't work.
So I changed my code like this:
char *path = getPath();
PHYSFS_init(path);
PHYSFS_addToSearchPath("Content/Audio.zip", 1);
if (PHYSFS_exists("bgm1.mp3")) {
cout<<"test"<<endl;
}
It still didn't work, but i hope get a "true answer".
thx for the lib.
--
使用Opera的电子邮件客户端:http://www.opera.com/mail/
More information about the physfs
mailing list