OPENGL: Fix GUI centering when using Fit to window (4:3) mode

This commit is contained in:
rsn8887 2020-01-23 15:04:00 -06:00
parent ea53202de9
commit 1489f2ed0f

View file

@ -510,8 +510,10 @@ void OpenGLGraphicsManager::updateScreen() {
// Second step: Draw the overlay if visible.
if (_overlayVisible) {
int dstX = (_windowWidth - _overlayDrawRect.width()) / 2;
int dstY = (_windowHeight - _overlayDrawRect.height()) / 2;
_backBuffer.enableBlend(Framebuffer::kBlendModeTraditionalTransparency);
g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), 0, 0, _overlayDrawRect.width(), _overlayDrawRect.height());
g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), dstX, dstY, _overlayDrawRect.width(), _overlayDrawRect.height());
}
// Third step: Draw the cursor if visible.