# HG changeset patch # User Michael Pavone # Date 1462138152 25200 # Node ID 534f522a11627c4c66e0b80d44fad1589a449ca7 # Parent 8d032a368dd561731b5e1b2f0a187bc4a3310943 Added a config option that allows turning scanlines on and off diff -r 8d032a368dd5 -r 534f522a1162 default.cfg --- 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 { diff -r 8d032a368dd5 -r 534f522a1162 render_sdl.c --- 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);