From 962d3161a699b824324eb5f3c910ca52b2c06327 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 00:43:43 -0400 Subject: [PATCH 1/8] Made viWidth editable with the definite limits. --- settings_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings_data.c b/settings_data.c index cf3c7771e6..46dbbeeb5c 100644 --- a/settings_data.c +++ b/settings_data.c @@ -2384,7 +2384,7 @@ rarch_setting_t *setting_data_get_list(void) CONFIG_UINT(g_extern.console.screen.viewports.custom_vp.width, "custom_viewport_width", "Custom Viewport Width", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL) CONFIG_UINT(g_extern.console.screen.viewports.custom_vp.height, "custom_viewport_height", "Custom Viewport Height", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL) #ifdef GEKKO - CONFIG_UINT(g_settings.video.viwidth, "video_viwidth", "Set Screen Width", video_viwidth, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) + CONFIG_UINT(g_settings.video.viwidth, "video_viwidth", "Set Screen Width", video_viwidth, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_RANGE(640, 720, 2, true, true) #endif CONFIG_BOOL(g_settings.video.smooth, "video_smooth", "Use Bilinear Filtering", video_smooth, "Point filtering", "Bilinear filtering", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) #if defined(__CELLOS_LV2__) From 0950b07429e746f1f1688c5f3cd4bac1548d92c8 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 00:59:36 -0400 Subject: [PATCH 2/8] Added GX Deflicker filter --- settings_data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/settings_data.c b/settings_data.c index 46dbbeeb5c..ff9144620e 100644 --- a/settings_data.c +++ b/settings_data.c @@ -2385,6 +2385,7 @@ rarch_setting_t *setting_data_get_list(void) CONFIG_UINT(g_extern.console.screen.viewports.custom_vp.height, "custom_viewport_height", "Custom Viewport Height", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL) #ifdef GEKKO CONFIG_UINT(g_settings.video.viwidth, "video_viwidth", "Set Screen Width", video_viwidth, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_RANGE(640, 720, 2, true, true) + CONFIG_BOOL(g_settings.video.vfilter, "video_vfilter", "Deflicker", video_vfilter, "OFF", "ON", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) #endif CONFIG_BOOL(g_settings.video.smooth, "video_smooth", "Use Bilinear Filtering", video_smooth, "Point filtering", "Bilinear filtering", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) #if defined(__CELLOS_LV2__) From 482854f217f4580a2cf07aeac9b4c522b2f6d341 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:09:30 -0400 Subject: [PATCH 3/8] Connect Deflicker to config --- gfx/gx/gx_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gx/gx_gfx.c b/gfx/gx/gx_gfx.c index 85b6b87377..e4cd742aa8 100644 --- a/gfx/gx/gx_gfx.c +++ b/gfx/gx/gx_gfx.c @@ -261,7 +261,7 @@ void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines) GX_SetDispCopyDst(xfbWidth, xfbHeight); GX_SetCopyFilter(gx_mode.aa, gx_mode.sample_pattern, - (gx_mode.xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, + (gx_mode.xfbMode == VI_XFBMODE_SF) ? GX_FALSE : g_settings.video.vfilter, gx_mode.vfilter); GXColor color = { 0, 0, 0, 0xff }; GX_SetCopyClear(color, GX_MAX_Z24); From 68360817811c9fa7a98149677bc88ccee3151586 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:13:08 -0400 Subject: [PATCH 4/8] Added GX Deflicker option --- config.def.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.def.h b/config.def.h index 780da0552d..85fbc37934 100644 --- a/config.def.h +++ b/config.def.h @@ -390,6 +390,9 @@ static const bool video_shared_context = false; /* Sets GC/Wii screen width. */ static const unsigned video_viwidth = 640; +/* Removes 480i flicker, smooths picture a little. */ +static const bool video_vfilter = true; + /* Smooths picture. */ static const bool video_smooth = true; From e4ed9f098da694a22622cfa70455773f92bf8e14 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:26:00 -0400 Subject: [PATCH 5/8] Deflicker stuff --- driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver.c b/driver.c index 3b7fb2e6be..b7a8aad9d4 100644 --- a/driver.c +++ b/driver.c @@ -1184,6 +1184,7 @@ static void init_video_input(void) video.force_aspect = g_settings.video.force_aspect; #ifdef GEKKO video.viwidth = g_settings.video.viwidth; + video.vfilter = g_settings.video.vfilter; #endif video.smooth = g_settings.video.smooth; video.input_scale = scale; From 1a98cacee84c05b54744de8d7dfbb9b19e8544b6 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:27:38 -0400 Subject: [PATCH 6/8] Deflicker stuff --- driver.h | 1 + 1 file changed, 1 insertion(+) diff --git a/driver.h b/driver.h index 5319c370e6..6eb40dad68 100644 --- a/driver.h +++ b/driver.h @@ -170,6 +170,7 @@ typedef struct video_info bool vsync; bool force_aspect; unsigned viwidth; + bool vfilter; bool smooth; /* Maximum input size: RARCH_SCALE_BASE * input_scale */ unsigned input_scale; From 8816a3403cce7a3978092a701f8f85b648230153 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:37:43 -0400 Subject: [PATCH 7/8] Deflicker stuff --- general.h | 1 + 1 file changed, 1 insertion(+) diff --git a/general.h b/general.h index 84f3335802..ba666f3f49 100644 --- a/general.h +++ b/general.h @@ -235,6 +235,7 @@ struct settings unsigned frame_delay; #ifdef GEKKO unsigned viwidth; + bool vfilter; #endif bool smooth; bool force_aspect; From 81c3ff1c6e5967ec234fa2455488580e3a755273 Mon Sep 17 00:00:00 2001 From: SuperrSonic Date: Sat, 4 Oct 2014 01:49:16 -0400 Subject: [PATCH 8/8] Deflicker stuff --- settings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/settings.c b/settings.c index 0c72ff4781..2905b4bf56 100644 --- a/settings.c +++ b/settings.c @@ -352,6 +352,7 @@ static void config_set_defaults(void) g_settings.video.force_srgb_disable = false; #ifdef GEKKO g_settings.video.viwidth = video_viwidth; + g_settings.video.vfilter = video_vfilter; #endif g_settings.video.smooth = video_smooth; g_settings.video.force_aspect = force_aspect; @@ -877,6 +878,7 @@ static bool config_load_file(const char *path, bool set_defaults) CONFIG_GET_BOOL(video.shared_context, "video_shared_context"); #ifdef GEKKO CONFIG_GET_INT(video.viwidth, "video_viwidth"); + CONFIG_GET_BOOL(video.vfilter, "video_vfilter"); #endif CONFIG_GET_BOOL(video.smooth, "video_smooth"); CONFIG_GET_BOOL(video.force_aspect, "video_force_aspect"); @@ -1527,6 +1529,7 @@ bool config_save_file(const char *path) config_set_bool(conf, "video_scale_integer", g_settings.video.scale_integer); #ifdef GEKKO config_set_int(conf, "video_viwidth", g_settings.video.viwidth); + config_set_bool(conf, "video_vfilter", g_settings.video.vfilter); #endif config_set_bool(conf, "video_smooth", g_settings.video.smooth); config_set_bool(conf, "video_threaded", g_settings.video.threaded);