Improved RenderWindow context creation
Former-commit-id: a744a433603e4f14ce6d7e7c269d5ff659b1a0f7
This commit is contained in:
parent
beb1879aca
commit
b899ff294b
|
|
@ -286,15 +286,15 @@ bool NzRenderWindow::OnWindowCreated()
|
||||||
m_parameters.doubleBuffered = true;
|
m_parameters.doubleBuffered = true;
|
||||||
m_parameters.window = GetHandle();
|
m_parameters.window = GetHandle();
|
||||||
|
|
||||||
m_context = new NzContext;
|
std::unique_ptr<NzContext> context(new NzContext);
|
||||||
if (!m_context->Create(m_parameters))
|
if (!context->Create(m_parameters))
|
||||||
{
|
{
|
||||||
NazaraError("Failed not create context");
|
NazaraError("Failed not create context");
|
||||||
delete m_context;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_context = context.release();
|
||||||
|
|
||||||
if (!SetActive(true)) // Les fenêtres s'activent à la création
|
if (!SetActive(true)) // Les fenêtres s'activent à la création
|
||||||
NazaraWarning("Failed to activate window");
|
NazaraWarning("Failed to activate window");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue