OGL: Correct unique_ptr types
By default unique_ptr will call delete on the given type if an array qualifier isn't present, not delete[]. It's important to explicitly specify an array is being handled.
This commit is contained in:
parent
a898aa1585
commit
1bcfae5fd7
|
@ -848,7 +848,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
g_renderer->RestoreAPIState();
|
g_renderer->RestoreAPIState();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<float> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]);
|
std::unique_ptr<float[]> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]);
|
||||||
|
|
||||||
glReadPixels(targetPixelRc.left, targetPixelRc.bottom, targetPixelRcWidth, targetPixelRcHeight,
|
glReadPixels(targetPixelRc.left, targetPixelRc.bottom, targetPixelRcWidth, targetPixelRcHeight,
|
||||||
GL_DEPTH_COMPONENT, GL_FLOAT, depthMap.get());
|
GL_DEPTH_COMPONENT, GL_FLOAT, depthMap.get());
|
||||||
|
@ -887,7 +887,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
g_renderer->RestoreAPIState();
|
g_renderer->RestoreAPIState();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<u32> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]);
|
std::unique_ptr<u32[]> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]);
|
||||||
|
|
||||||
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3)
|
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3)
|
||||||
// XXX: Swap colours
|
// XXX: Swap colours
|
||||||
|
|
Loading…
Reference in New Issue