mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge pull request #578 from Azaezel/alpha40/dedicatedGFXnullouts
dedicated gfx device suppression
This commit is contained in:
commit
2fe767f2cd
3 changed files with 18 additions and 12 deletions
|
|
@ -290,7 +290,7 @@ GFXAdapter *GFXInit::getBestAdapterChoice()
|
|||
{
|
||||
S32 adapterIdx = dAtoi(adapterDevice.c_str());
|
||||
if (adapterIdx == -1)
|
||||
adapter = chooseAdapter(adapterType, outputDevice.c_str());
|
||||
adapter = chooseAdapter(NullDevice, outputDevice.c_str());
|
||||
else
|
||||
adapter = chooseAdapter(adapterType, adapterIdx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,17 +258,19 @@ bool GuiCanvas::onAdd()
|
|||
// Make sure we're able to render.
|
||||
newDevice->setAllowRender( true );
|
||||
|
||||
if(mDisplayWindow)
|
||||
// NULL device returns a nullptr for getPlatformWindow
|
||||
PlatformWindow* window = getPlatformWindow();
|
||||
if (mDisplayWindow && window)
|
||||
{
|
||||
getPlatformWindow()->show();
|
||||
window->show();
|
||||
WindowManager->setDisplayWindow(true);
|
||||
getPlatformWindow()->setDisplayWindow(true);
|
||||
window->setDisplayWindow(true);
|
||||
}
|
||||
else
|
||||
else if (window)
|
||||
{
|
||||
getPlatformWindow()->hide();
|
||||
window->hide();
|
||||
WindowManager->setDisplayWindow(false);
|
||||
getPlatformWindow()->setDisplayWindow(false);
|
||||
window->setDisplayWindow(false);
|
||||
}
|
||||
|
||||
// Propagate add to parents.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue