libretro: add "Interlace mode" to UNAI options
authorApaczer <94932128+Apaczer@users.noreply.github.com>
Tue, 18 Mar 2025 13:49:26 +0000 (14:49 +0100)
committernotaz <notasas@gmail.com>
Sat, 22 Mar 2025 23:32:16 +0000 (01:32 +0200)
frontend/libretro.c
frontend/libretro_core_options.h

index 8571c45..03db4b4 100644 (file)
@@ -949,6 +949,7 @@ static bool update_option_visibility(void)
          struct retro_core_option_display option_display;
          char gpu_unai_option[][40] = {
             "pcsx_rearmed_gpu_unai_blending",
+            "pcsx_rearmed_gpu_unai_skipline",
             "pcsx_rearmed_gpu_unai_lighting",
             "pcsx_rearmed_gpu_unai_fast_lighting",
             "pcsx_rearmed_gpu_unai_scale_hires",
@@ -2696,6 +2697,17 @@ static void update_variables(bool in_flight)
          pl_rearmed_cbs.gpu_unai.old_renderer = 0;
    }
 
+   var.key = "pcsx_rearmed_gpu_unai_skipline";
+   var.value = NULL;
+
+   if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+   {
+      if (strcmp(var.value, "disabled") == 0)
+         pl_rearmed_cbs.gpu_unai.ilace_force = 0;
+      else if (strcmp(var.value, "enabled") == 0)
+         pl_rearmed_cbs.gpu_unai.ilace_force = 1;
+   }
+
    var.key = "pcsx_rearmed_gpu_unai_lighting";
    var.value = NULL;
 
index 3e80968..de65b47 100644 (file)
@@ -781,6 +781,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
       },
       "enabled",
    },
+   {
+      "pcsx_rearmed_gpu_unai_skipline",
+      "(GPU) Skip every 2nd line",
+      "Skip every 2nd line",
+      "Skips every second scanline. Can be enabled to improve performance at the expense of display inaccuracies (artifacts etc.).",
+      NULL,
+      "gpu_unai",
+      {
+         { "disabled", NULL },
+         { "enabled",  NULL },
+         { NULL, NULL},
+      },
+      "disabled",
+   },
    {
       "pcsx_rearmed_gpu_unai_lighting",
       "(GPU) Lighting Effects",