GBA: Fix hi-res videos
Vicki Pfau vi@endrift.com
Fri, 17 May 2019 14:40:16 -0700
2 files changed,
4 insertions(+),
4 deletions(-)
M
src/gba/core.c
→
src/gba/core.c
@@ -355,7 +355,9 @@ static void _GBACoreSetAVStream(struct mCore* core, struct mAVStream* stream) {
struct GBA* gba = core->board; gba->stream = stream; if (stream && stream->videoDimensionsChanged) { - stream->videoDimensionsChanged(stream, GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS); + unsigned width, height; + core->desiredVideoDimensions(core, &width, &height); + stream->videoDimensionsChanged(stream, width, height); } }
M
src/gba/renderers/gl.c
→
src/gba/renderers/gl.c
@@ -820,9 +820,6 @@
if (y == 0) { glDisable(GL_SCISSOR_TEST); glClearColor(0, 0, 0, 0); - glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT3 }); - glClear(GL_COLOR_BUFFER_BIT); - glBindFramebuffer(GL_FRAMEBUFFER, glRenderer->fbo[GBA_GL_FBO_OBJ]); glDrawBuffers(2, (GLenum[]) { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }); glClear(GL_COLOR_BUFFER_BIT);@@ -939,6 +936,7 @@ *stride = GBA_VIDEO_HORIZONTAL_PIXELS * glRenderer->scale;
if (!glRenderer->temporaryBuffer) { glRenderer->temporaryBuffer = anonymousMemoryMap(GBA_VIDEO_HORIZONTAL_PIXELS * GBA_VIDEO_VERTICAL_PIXELS * glRenderer->scale * glRenderer->scale * BYTES_PER_PIXEL); } + glFinish(); glBindFramebuffer(GL_FRAMEBUFFER, glRenderer->fbo[GBA_GL_FBO_OUTPUT]); glPixelStorei(GL_PACK_ROW_LENGTH, GBA_VIDEO_HORIZONTAL_PIXELS * glRenderer->scale); glPixelStorei(GL_PACK_ALIGNMENT, 1);