Added support for using osgDB::fineFile into the .flt plugin.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <malloc.h>
|
||||
|
||||
#include <osg/Notify>
|
||||
#include <osgDB/FileUtils>
|
||||
|
||||
#include "Input.h"
|
||||
#include "Record.h"
|
||||
@@ -63,7 +64,15 @@ bool FileInput::eof()
|
||||
bool FileInput::open(const std::string& fileName)
|
||||
{
|
||||
_file=::fopen( fileName.c_str(), "rb");
|
||||
if (_file == NULL) return false;
|
||||
if (_file == NULL)
|
||||
{
|
||||
// ok havn't found file, resort to using findFile...
|
||||
std::string newFileName = osgDB::findFile(fileName.c_str());
|
||||
if (newFileName.empty()) return false;
|
||||
|
||||
_file=::fopen( fileName.c_str(), "rb");
|
||||
if (_file == NULL) return false;
|
||||
}
|
||||
_eof = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user