Added reading of the P3D_DEVICE env var for setting up the --device entry.
This commit is contained in:
parent
a6f3e0af78
commit
98e9f187b3
@ -402,6 +402,17 @@ int main( int argc, char **argv )
|
|||||||
doSetViewer = false;
|
doSetViewer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* p3dDevice = getenv("P3D_DEVICE");
|
||||||
|
if (p3dDevice)
|
||||||
|
{
|
||||||
|
osg::ref_ptr<osgGA::Device> dev = osgDB::readFile<osgGA::Device>(p3dDevice);
|
||||||
|
if (dev.valid())
|
||||||
|
{
|
||||||
|
viewer.addDevice(dev.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string device;
|
std::string device;
|
||||||
while (arguments.read("--device", device))
|
while (arguments.read("--device", device))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user