summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.cfg1
-rwxr-xr-xrender_sdl.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/default.cfg b/default.cfg
index 84376c6..b6e26cc 100644
--- a/default.cfg
+++ b/default.cfg
@@ -108,6 +108,7 @@ video {
width 640
vertex_shader default.v.glsl
fragment_shader default.f.glsl
+ scanlines false
}
audio {
diff --git a/render_sdl.c b/render_sdl.c
index 974e180..d2ce7e7 100755
--- a/render_sdl.c
+++ b/render_sdl.c
@@ -27,6 +27,7 @@ int main_width, main_height, is_fullscreen;
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 @@ void render_init(int width, int height, char * title, uint32_t fps, uint8_t full
}
#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 @@ void render_context(vdp_context * context)
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);