mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
support loading icons through the VFS
This commit is contained in:
parent
c8c7ea5dfb
commit
ea3b967f8a
@ -1883,8 +1883,9 @@ get_cursor(const Filename &filename) {
|
||||
}
|
||||
|
||||
// If it wasn't found, resolve the filename and search for that.
|
||||
Filename resolved = filename;
|
||||
if (!resolved.resolve_filename(get_model_path())) {
|
||||
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
|
||||
Filename resolved (filename);
|
||||
if (!vfs->resolve_filename(resolved, get_model_path())) {
|
||||
// The filename doesn't exist.
|
||||
x11display_cat.warning()
|
||||
<< "Could not find cursor filename " << filename << "\n";
|
||||
@ -1897,7 +1898,6 @@ get_cursor(const Filename &filename) {
|
||||
}
|
||||
|
||||
// Open the file through the virtual file system.
|
||||
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
|
||||
istream *str = vfs->open_read_file(resolved, true);
|
||||
if (str == NULL) {
|
||||
x11display_cat.warning()
|
||||
|
Loading…
x
Reference in New Issue
Block a user