mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -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) {
|
Open(const Rocket::Core::String& path) {
|
||||||
rocket_cat.debug() << "Opening " << path.CString() << "\n";
|
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
|
// A FileHandle is actually just a void pointer
|
||||||
return (Rocket::Core::FileHandle)
|
return (Rocket::Core::FileHandle) ptr;
|
||||||
_vfs->open_read_file(Filename::from_os_specific(path.CString()), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user