Files
buildroot/package/miyoo/retroarch/libretro-pcsx_rearmed/0003-LIBERTRO-add-Interlace-mode-to-UNAI-options.patch
Apaczer 529bfbd43e PKG/BOARD: update libretro-pcsx_rearmed & optimize (#160)
* PKG: libretro-pcsx_rearmed: 
- update to f49a4c
- new optimize patches (adjust core options)
- use D/L submodules
* BOARD: add musl PGO data for `libretro-pcsx_rearmed`
* BOARD: update uclibc PGO data `lr-pcsx_rearmed`
- and change from https to git site method
- rm dubious sed cmd

* PKG: lr-pcsx_rearmed: PATCH add Interlace mode
2025-03-30 21:57:18 +02:00

69 lines
2.3 KiB
Diff

From 01cf6d834eb73d8bfa427b3ae21d7c8bd160161c Mon Sep 17 00:00:00 2001
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
Date: Tue, 18 Mar 2025 14:49:26 +0100
Subject: [PATCH] LIBERTRO: add "Interlace mode" to UNAI options
---
frontend/libretro.c | 12 ++++++++++++
frontend/libretro_core_options.h | 14 ++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/frontend/libretro.c b/frontend/libretro.c
index c67333ab..58f72299 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -923,6 +923,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_interlace",
"pcsx_rearmed_gpu_unai_lighting",
"pcsx_rearmed_gpu_unai_fast_lighting",
"pcsx_rearmed_gpu_unai_scale_hires",
@@ -2655,6 +2656,17 @@ static void update_variables(bool in_flight)
pl_rearmed_cbs.gpu_unai.old_renderer = 0;
}
+ var.key = "pcsx_rearmed_gpu_unai_interlace";
+ 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;
diff --git a/frontend/libretro_core_options.h b/frontend/libretro_core_options.h
index 8cb42c0e..81b28260 100644
--- a/frontend/libretro_core_options.h
+++ b/frontend/libretro_core_options.h
@@ -787,6 +787,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"enabled",
},
+ {
+ "pcsx_rearmed_gpu_unai_interlace",
+ "(GPU) Interlace mode",
+ "Interlace mode",
+ "Enable simulated interlace mode, which 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",
--
2.45.2.windows.1