Skip to content

Commit

Permalink
Use default render target on CEGUI system bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Lpsd committed Oct 8, 2024
1 parent 0dc1b64 commit 57f0d99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Client/gui/CGUI_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ CGUI_Impl::CGUI_Impl(IDirect3DDevice9* pDevice)
// Set XML parser defaults
m_pXMLParser = m_pSystem->getXMLParser();

auto& resolution = GetResolution();
CEGUI::TextureTarget* renderTextureTarget = m_pSystem->getRenderer()->createTextureTarget(false);
renderTextureTarget->declareRenderSize(CEGUI::Sizef(resolution.fX, resolution.fY));
m_pDefaultGUIContext = &m_pSystem->createGUIContext(static_cast<CEGUI::RenderTarget&>(*renderTextureTarget));
// Create default GUI context
m_pDefaultGUIContext = &m_pSystem->createGUIContext(m_pRenderer->getDefaultRenderTarget());

if (m_pXMLParser->isPropertyPresent("SchemaDefaultResourceGroup"))
m_pXMLParser->setProperty("SchemaDefaultResourceGroup", "mta_xml_schemas");
Expand Down

0 comments on commit 57f0d99

Please sign in to comment.