diff options
author | hizzlekizzle | 2020-08-13 18:06:23 -0500 |
---|---|---|
committer | GitHub | 2020-08-13 18:06:23 -0500 |
commit | d56340b165b4a7ef25bc3c7509d4f2315843bc31 (patch) | |
tree | c2adb49f15dd24282077446f93548b4731f7d1ee /frontend | |
parent | ddd39f209f4ce6f03ed3198d7d58c2e36565baa9 (diff) | |
parent | 43047988e507799d7d5bbcd926c5d0b5b94fcdc1 (diff) | |
download | pcsx_rearmed-d56340b165b4a7ef25bc3c7509d4f2315843bc31.tar.gz pcsx_rearmed-d56340b165b4a7ef25bc3c7509d4f2315843bc31.tar.bz2 pcsx_rearmed-d56340b165b4a7ef25bc3c7509d4f2315843bc31.zip |
Merge pull request #444 from justinweiss/hires-downscale
Add an option to downscale hi-res views
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/libretro.c | 18 | ||||
-rw-r--r-- | frontend/libretro_core_options.h | 11 | ||||
-rw-r--r-- | frontend/main.c | 1 | ||||
-rw-r--r-- | frontend/menu.c | 1 | ||||
-rw-r--r-- | frontend/plugin_lib.h | 1 |
5 files changed, 29 insertions, 3 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c index a8895d8..699cbce 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1999,6 +1999,17 @@ static void update_variables(bool in_flight) pl_rearmed_cbs.gpu_unai.blending = 1; } + var.key = "pcsx_rearmed_gpu_unai_scale_hires"; + var.value = NULL; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (strcmp(var.value, "disabled") == 0) + pl_rearmed_cbs.gpu_unai.scale_hires = 0; + else if (strcmp(var.value, "enabled") == 0) + pl_rearmed_cbs.gpu_unai.scale_hires = 1; + } + var.key = "pcsx_rearmed_show_gpu_unai_settings"; var.value = NULL; @@ -2014,17 +2025,18 @@ static void update_variables(bool in_flight) { unsigned i; struct retro_core_option_display option_display; - char gpu_unai_option[5][40] = { + char gpu_unai_option[6][40] = { "pcsx_rearmed_gpu_unai_blending", "pcsx_rearmed_gpu_unai_lighting", "pcsx_rearmed_gpu_unai_fast_lighting", "pcsx_rearmed_gpu_unai_ilace_force", - "pcsx_rearmed_gpu_unai_pixel_skip" + "pcsx_rearmed_gpu_unai_pixel_skip", + "pcsx_rearmed_gpu_unai_scale_hires" }; option_display.visible = show_advanced_gpu_unai_settings; - for (i = 0; i < 5; i++) + for (i = 0; i < 6; i++) { option_display.key = gpu_unai_option[i]; environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); diff --git a/frontend/libretro_core_options.h b/frontend/libretro_core_options.h index 92d723e..40aebb4 100644 --- a/frontend/libretro_core_options.h +++ b/frontend/libretro_core_options.h @@ -961,6 +961,17 @@ struct retro_core_option_definition option_defs_us[] = { }, "disabled", }, + { + "pcsx_rearmed_gpu_unai_scale_hires", + "(GPU) Enable Hi-Res Downscaling", + "When enabled, will scale hi-res modes to 320x240, skipping unrendered pixels.", + { + { "disabled", NULL }, + { "enabled", NULL }, + { NULL, NULL}, + }, + "disabled", + }, #endif /* GPU UNAI Advanced Settings */ { diff --git a/frontend/main.c b/frontend/main.c index b1ee4c7..51cb7bf 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -140,6 +140,7 @@ void emu_set_default_config(void) pl_rearmed_cbs.gpu_unai.abe_hack = pl_rearmed_cbs.gpu_unai.no_light = pl_rearmed_cbs.gpu_unai.no_blend = 0; + pl_rearmed_cbs.gpu_unai.scale_hires = 0; memset(&pl_rearmed_cbs.gpu_peopsgl, 0, sizeof(pl_rearmed_cbs.gpu_peopsgl)); pl_rearmed_cbs.gpu_peopsgl.iVRamSize = 64; pl_rearmed_cbs.gpu_peopsgl.iTexGarbageCollection = 1; diff --git a/frontend/menu.c b/frontend/menu.c index f4a45ba..e5c2738 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -432,6 +432,7 @@ static const struct { CE_INTVAL_P(gpu_unai.abe_hack), CE_INTVAL_P(gpu_unai.no_light), CE_INTVAL_P(gpu_unai.no_blend), + CE_INTVAL_P(gpu_unai.scale_hires), CE_INTVAL_P(gpu_neon.allow_interlace), CE_INTVAL_P(gpu_neon.enhancement_enable), CE_INTVAL_P(gpu_neon.enhancement_no_main), diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index 7570001..114aaad 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -93,6 +93,7 @@ struct rearmed_cbs { int abe_hack; int no_light, no_blend; int lineskip; + int scale_hires; } gpu_unai; struct { int dwActFixes; |