Improve openvr, also add a module for it.

This commit is contained in:
James Urquhart 2016-04-25 23:26:27 +01:00
parent ba91478fad
commit 126828131d
4 changed files with 199 additions and 14 deletions

View file

@ -293,19 +293,19 @@ GFXAdapter *GFXInit::getBestAdapterChoice()
// Get the user's preference for device...
const String renderer = Con::getVariable("$pref::Video::displayDevice");
const String outputDevice = Con::getVariable("$pref::Video::displayOutputDevice");
const String adapterDevice = Con::getVariable("$Video::forceDisplayAdapter");
const String adapterDevice = Con::getVariable("$Video::forceDisplayAdapter");
GFXAdapterType adapterType = getAdapterTypeFromName(renderer.c_str());;
GFXAdapter *adapter;
GFXAdapterType adapterType = getAdapterTypeFromName(renderer.c_str());;
GFXAdapter *adapter;
if (adapterDevice.isEmpty())
{
adapter = chooseAdapter(adapterType, outputDevice.c_str());
}
else
{
adapter = chooseAdapter(adapterType, dAtoi(adapterDevice.c_str()));
}
if (adapterDevice.isEmpty())
{
adapter = chooseAdapter(adapterType, outputDevice.c_str());
}
else if (dAtoi(adapterDevice.c_str()) != -1)
{
adapter = chooseAdapter(adapterType, dAtoi(adapterDevice.c_str()));
}
// Did they have one? Return it.
if(adapter)