diff --git a/data/gui/custom_video_settings.stkgui b/data/gui/custom_video_settings.stkgui
index ad2c62572..8fd2fca41 100644
--- a/data/gui/custom_video_settings.stkgui
+++ b/data/gui/custom_video_settings.stkgui
@@ -124,13 +124,12 @@
-
diff --git a/src/states_screens/dialogs/custom_video_settings.cpp b/src/states_screens/dialogs/custom_video_settings.cpp
index 89bf7e3dd..94f0be781 100644
--- a/src/states_screens/dialogs/custom_video_settings.cpp
+++ b/src/states_screens/dialogs/custom_video_settings.cpp
@@ -52,6 +52,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
getWidget("anim_gfx")->setState( UserConfigParams::m_graphical_effects );
getWidget("weather_gfx")->setState( UserConfigParams::m_weather_effects );
getWidget("ubo")->setState(!UserConfigParams::m_ubo_disabled);
+ getWidget("dof")->setState(UserConfigParams::m_dof);
SpinnerWidget* kart_anim = getWidget("steering_animations");
kart_anim->addLabel( _("Disabled") ); // 0
@@ -102,12 +103,14 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
bool dynamic_light = getWidget("dynamiclight")->getState();
UserConfigParams::m_dynamic_lights = dynamic_light;
- UserConfigParams::m_graphical_effects =
+ UserConfigParams::m_graphical_effects =
getWidget("anim_gfx")->getState();
- UserConfigParams::m_weather_effects =
+ UserConfigParams::m_weather_effects =
getWidget("weather_gfx")->getState();
UserConfigParams::m_ubo_disabled =
!getWidget("ubo")->getState();
+ UserConfigParams::m_dof =
+ getWidget("dof")->getState();
UserConfigParams::m_motionblur =
getWidget("motionblur")->getState();
diff --git a/src/states_screens/options_screen_video.cpp b/src/states_screens/options_screen_video.cpp
index 28389d8d5..44c026336 100644
--- a/src/states_screens/options_screen_video.cpp
+++ b/src/states_screens/options_screen_video.cpp
@@ -59,6 +59,8 @@ struct GFXPreset
bool animatedScenery;
int animatedCharacters;
int anisotropy;
+ /** Depth of field */
+ bool dof;
};
static GFXPreset GFX_PRESETS[] =
@@ -66,31 +68,31 @@ static GFXPreset GFX_PRESETS[] =
{
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
- false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */
+ false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */, false /* depth of field */
},
{
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
- true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */
+ true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */, false /* depth of field */
},
{
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
- true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */
+ true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */, false /* depth of field */
},
{
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
- true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */
+ true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */, false /* depth of field */
},
{
true /* light */, 2 /* shadow */, true /* bloom */, true /* motionblur */,
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
- true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */
+ true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */, true /* depth of field */
}
};
@@ -359,7 +361,8 @@ void OptionsScreenVideo::updateGfxSlider()
//GFX_PRESETS[l].shaders == UserConfigParams::m_pixel_shaders
GFX_PRESETS[l].shadows == UserConfigParams::m_shadows &&
GFX_PRESETS[l].ssao == UserConfigParams::m_ssao &&
- GFX_PRESETS[l].weather == UserConfigParams::m_weather_effects)
+ GFX_PRESETS[l].weather == UserConfigParams::m_weather_effects &&
+ GFX_PRESETS[l].dof == UserConfigParams::m_dof)
{
gfx->setValue(l + 1);
found = true;
@@ -523,6 +526,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
UserConfigParams::m_shadows = GFX_PRESETS[level].shadows;
UserConfigParams::m_ssao = GFX_PRESETS[level].ssao;
UserConfigParams::m_weather_effects = GFX_PRESETS[level].weather;
+ UserConfigParams::m_dof = GFX_PRESETS[level].dof;
updateGfxSlider();
}