Mercurial > repos > blastem
changeset 1003:534f522a1162
Added a config option that allows turning scanlines on and off
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 01 May 2016 14:29:12 -0700 |
parents | 8d032a368dd5 |
children | fc000f245cc8 |
files | default.cfg render_sdl.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/default.cfg Sun May 01 13:36:14 2016 -0700 +++ b/default.cfg Sun May 01 14:29:12 2016 -0700 @@ -108,6 +108,7 @@ width 640 vertex_shader default.v.glsl fragment_shader default.f.glsl + scanlines false } audio {
--- a/render_sdl.c Sun May 01 13:36:14 2016 -0700 +++ b/render_sdl.c Sun May 01 14:29:12 2016 -0700 @@ -27,6 +27,7 @@ uint8_t render_dbg = 0; uint8_t debug_pal = 0; uint8_t render_gl = 1; +uint8_t scanlines = 0; uint32_t last_frame = 0; @@ -334,6 +335,8 @@ } #endif } + def.ptrval = "false"; + scanlines = !strcmp(tern_find_path_default(config, "video\0scanlines\0", def).ptrval, "true"); caption = title; min_delay = 0; @@ -413,7 +416,7 @@ glUniform1i(un_textures[0], 0); glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, (context->regs[REG_MODE_4] & BIT_INTERLACE) ? textures[1] : textures[2]); + glBindTexture(GL_TEXTURE_2D, textures[(context->regs[REG_MODE_4] & BIT_INTERLACE) ? 1 : scanlines ? 2 : 0]); glUniform1i(un_textures[1], 1); glUniform1f(un_width, width);