mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
show error message when rocket fails to open a file
This commit is contained in:
parent
fd1f1e19b3
commit
6795dd86b1
@ -37,9 +37,15 @@ Rocket::Core::FileHandle RocketFileInterface::
|
||||
Open(const Rocket::Core::String& path) {
|
||||
rocket_cat.debug() << "Opening " << path.CString() << "\n";
|
||||
|
||||
Filename fn = Filename::from_os_specific(path.CString());
|
||||
void *ptr = (void*) _vfs->open_read_file(fn, true);
|
||||
|
||||
if (ptr == NULL) {
|
||||
rocket_cat.error() << "Failed to open " << fn << "\n";
|
||||
}
|
||||
|
||||
// A FileHandle is actually just a void pointer
|
||||
return (Rocket::Core::FileHandle)
|
||||
_vfs->open_read_file(Filename::from_os_specific(path.CString()), true);
|
||||
return (Rocket::Core::FileHandle) ptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user