[AD] physfs current directory |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Trent was wondering in #nooskewl how the recent "physfs: Implement
al_change_directory semantics. " patch works together with the PhysFS
search paths:
https://github.com/elias-pschernig/allegro5/commit/c6d76b1b653679dbbdd5987b3fb14472bae8d6f6
I haven't used PhysFS myself so may be misunderstanding. But the idea of
PhysFS seems to be that you do:
al_load_bitmap("sprite.png")
And PhysFS then goes through its list of search paths to find the file.
But after that patch physfs now is looking for a file "/sprite.png"
only. For example in ex_physfs, if I remove this line:
PHYSFS_addToSearchPath("data/ex_physfs.zip", 1)
Then put a file "02.png" into /tmp and run it as:
ex_physfs /tmp
It will fail to find the file, instead trying to open a
non-existing "/02.png".