diff options
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/libretro.c | 22 | ||||
-rw-r--r-- | frontend/plugin_lib.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c index 35e37a0..090e10b 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -447,6 +447,7 @@ void retro_set_environment(retro_environment_t cb) { "pcsx_rearmed_multitap1", "Multitap 1; auto|disabled|enabled" }, { "pcsx_rearmed_multitap2", "Multitap 2; auto|disabled|enabled" }, { "pcsx_rearmed_vibration", "Enable Vibration; enabled|disabled" }, + { "pcsx_rearmed_dithering", "Enable Dithering; enabled|disabled" }, #ifndef DRC_DISABLE { "pcsx_rearmed_drc", "Dynamic recompiler; enabled|disabled" }, #endif @@ -1358,6 +1359,27 @@ static void update_variables(bool in_flight) in_enable_vibration = 1; } + var.value = NULL; + var.key = "pcsx_rearmed_dithering"; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + if (strcmp(var.value, "disabled") == 0) { + pl_rearmed_cbs.gpu_peops.iUseDither = 0; + pl_rearmed_cbs.gpu_peopsgl.bDrawDither = 0; +#ifdef __ARM_NEON__ + pl_rearmed_cbs.gpu_neon.allow_dithering = 0; +#endif + } + else if (strcmp(var.value, "enabled") == 0) { + pl_rearmed_cbs.gpu_peops.iUseDither = 1; + pl_rearmed_cbs.gpu_peopsgl.bDrawDither = 1; +#ifdef __ARM_NEON__ + pl_rearmed_cbs.gpu_neon.allow_dithering = 1; +#endif + } + } + #ifdef __ARM_NEON__ var.value = "NULL"; var.key = "pcsx_rearmed_neon_interlace_enable"; diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index 83b2774..92e62e9 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -71,6 +71,7 @@ struct rearmed_cbs { int allow_interlace; // 0 off, 1 on, 2 guess int enhancement_enable; int enhancement_no_main; + int allow_dithering; } gpu_neon; struct { int iUseDither; |