support loading icons through the VFS

This commit is contained in:
rdb 2012-03-13 17:35:28 +00:00
parent c8c7ea5dfb
commit ea3b967f8a

View File

@ -1883,8 +1883,9 @@ get_cursor(const Filename &filename) {
} }
// If it wasn't found, resolve the filename and search for that. // If it wasn't found, resolve the filename and search for that.
Filename resolved = filename; VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
if (!resolved.resolve_filename(get_model_path())) { Filename resolved (filename);
if (!vfs->resolve_filename(resolved, get_model_path())) {
// The filename doesn't exist. // The filename doesn't exist.
x11display_cat.warning() x11display_cat.warning()
<< "Could not find cursor filename " << filename << "\n"; << "Could not find cursor filename " << filename << "\n";
@ -1897,7 +1898,6 @@ get_cursor(const Filename &filename) {
} }
// Open the file through the virtual file system. // Open the file through the virtual file system.
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
istream *str = vfs->open_read_file(resolved, true); istream *str = vfs->open_read_file(resolved, true);
if (str == NULL) { if (str == NULL) {
x11display_cat.warning() x11display_cat.warning()