mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix copy to RDRAM for native resolution factors above 1.
Fixed Broken monitor in MK64 #929
This commit is contained in:
parent
85101a5d67
commit
f3677db0a7
|
@ -1131,15 +1131,22 @@ bool FrameBufferToRDRAM::_prepareCopy(u32 _startAddress)
|
||||||
if (m_pCurFrameBuffer->m_scaleX > 1.0f) {
|
if (m_pCurFrameBuffer->m_scaleX > 1.0f) {
|
||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO);
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO);
|
||||||
glScissor(0, 0, m_pCurFrameBuffer->m_pTexture->realWidth, m_pCurFrameBuffer->m_pTexture->realHeight);
|
glScissor(0, 0, m_pCurFrameBuffer->m_pTexture->realWidth, m_pCurFrameBuffer->m_pTexture->realHeight);
|
||||||
const u32 screenWidth = ogl.getWidth();
|
|
||||||
u32 x0 = 0;
|
u32 x0 = 0;
|
||||||
u32 width = screenWidth;
|
u32 width, height;
|
||||||
if (ogl.isAdjustScreen()) {
|
if (config.frameBufferEmulation.nativeResFactor == 0) {
|
||||||
width = static_cast<u32>(screenWidth*ogl.getAdjustScale());
|
height = ogl.getHeight();
|
||||||
x0 = (screenWidth - width) / 2;
|
const u32 screenWidth = ogl.getWidth();
|
||||||
|
width = screenWidth;
|
||||||
|
if (ogl.isAdjustScreen()) {
|
||||||
|
width = static_cast<u32>(screenWidth*ogl.getAdjustScale());
|
||||||
|
x0 = (screenWidth - width) / 2;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
width = m_pCurFrameBuffer->m_pTexture->realWidth;
|
||||||
|
height = m_pCurFrameBuffer->m_pTexture->realHeight;
|
||||||
}
|
}
|
||||||
glBlitFramebuffer(
|
glBlitFramebuffer(
|
||||||
x0, 0, x0 + width, ogl.getHeight(),
|
x0, 0, x0 + width, height,
|
||||||
0, 0, VI.width, VI.height,
|
0, 0, VI.width, VI.height,
|
||||||
GL_COLOR_BUFFER_BIT, GL_NEAREST
|
GL_COLOR_BUFFER_BIT, GL_NEAREST
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user