mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Correctly handle invalid openvr adapters
This commit is contained in:
parent
b2faecc82d
commit
b58f34da9b
1 changed files with 7 additions and 3 deletions
|
|
@ -296,15 +296,19 @@ GFXAdapter *GFXInit::getBestAdapterChoice()
|
||||||
const String adapterDevice = Con::getVariable("$Video::forceDisplayAdapter");
|
const String adapterDevice = Con::getVariable("$Video::forceDisplayAdapter");
|
||||||
|
|
||||||
GFXAdapterType adapterType = getAdapterTypeFromName(renderer.c_str());;
|
GFXAdapterType adapterType = getAdapterTypeFromName(renderer.c_str());;
|
||||||
GFXAdapter *adapter;
|
GFXAdapter *adapter = NULL;
|
||||||
|
|
||||||
if (adapterDevice.isEmpty())
|
if (adapterDevice.isEmpty())
|
||||||
{
|
{
|
||||||
adapter = chooseAdapter(adapterType, outputDevice.c_str());
|
adapter = chooseAdapter(adapterType, outputDevice.c_str());
|
||||||
}
|
}
|
||||||
else if (dAtoi(adapterDevice.c_str()) != -1)
|
else
|
||||||
{
|
{
|
||||||
adapter = chooseAdapter(adapterType, dAtoi(adapterDevice.c_str()));
|
S32 adapterIdx = dAtoi(adapterDevice.c_str());
|
||||||
|
if (adapterIdx == -1)
|
||||||
|
adapter = chooseAdapter(adapterType, outputDevice.c_str());
|
||||||
|
else
|
||||||
|
adapter = chooseAdapter(adapterType, adapterIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Did they have one? Return it.
|
// Did they have one? Return it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue