initial line-to-quad option

This commit is contained in:
hunterk 2018-08-26 21:36:01 -05:00
parent c8cdc623f3
commit 7ed2a2d7cd
2 changed files with 15 additions and 0 deletions

View File

@ -3898,6 +3898,7 @@ void retro_set_environment(retro_environment_t cb)
{ BEETLE_OPT(pgxp_vertex), "PGXP vertex cache; disabled|enabled" },
{ BEETLE_OPT(pgxp_texture), "PGXP perspective correct texturing; disabled|enabled" },
#endif
{ BEETLE_OPT(lineRender), "Line-to-quad hack (restart); default|aggressive|disabled" },
{ BEETLE_OPT(widescreen_hack), "Widescreen mode hack; disabled|enabled" },
{ BEETLE_OPT(frame_duping), "Frame duping (speedup); disabled|enabled" },
{ BEETLE_OPT(cpu_freq_scale), "CPU frequency scaling (overclock); 100% (native)|110%|120%|130%|140%|150%|160%|170%|180%|190%|200%|210%|220%|230%|240%|250%|260%|265%|270%|280%|290%|300%|310%|320%|330%|340%|350%|360%|370%|380%|390%|400%|410%|420%|430%|440%|450%|460%|470%|480%|490%|500%|50%|60%|70%|80%|90%" },

View File

@ -832,6 +832,20 @@ static void Command_DrawPolygon(PS_GPU *gpu, const uint32_t *cb)
blend_mode = BLEND_MODE_ADD;
}
struct retro_variable var = {0};
var.key = BEETLE_OPT(lineRender);
uint8_t filter_mode = 0;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "disabled"))
lineRenderMode = 0;
else if (!strcmp(var.value, "default"))
lineRenderMode = 1;
else if (!strcmp(var.value, "agressive"))
lineRenderMode = 2;
}
// Line Renderer: Detect triangles that would resolve as lines at x1 scale and create second triangle to make quad
if ((lineRenderMode != 0) && (!lineFound) && (numvertices == 3) && (textured))
{