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; 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; 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; 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; 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); 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); diff --git a/settings_data.c b/settings_data.c index cf3c7771e6..ff9144620e 100644 --- a/settings_data.c +++ b/settings_data.c @@ -2384,7 +2384,8 @@ 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) + 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__)