diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-03-06 09:46:50 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-03-06 09:46:50 -0800 |
commit | 23cf6edf2d122fc74136abcce553dc0ecca03c10 (patch) | |
tree | 4072ce8a37dd033be3a150b7fde32fece0557288 /render_sdl.c | |
parent | 903393be7e738804d403174687970f3add2ad43b (diff) |
Width on glTexSubImage2D call in render_framebuffer_updated needs to match the buffer pitch
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-x | render_sdl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/render_sdl.c b/render_sdl.c index b0a0fa3..c69d1ec 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -575,7 +575,7 @@ void render_framebuffer_updated(uint8_t which, int width) #ifndef DISABLE_OPENGL if (render_gl && which <= FRAMEBUFFER_EVEN) { glBindTexture(GL_TEXTURE_2D, textures[which]); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, texture_buf + overscan_left[video_standard] + LINEBUF_SIZE * overscan_top[video_standard]); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, LINEBUF_SIZE, height, GL_BGRA, GL_UNSIGNED_BYTE, texture_buf + overscan_left[video_standard] + LINEBUF_SIZE * overscan_top[video_standard]); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); |