Fix warnings reported by clang
[oweals/minetest.git] / src / drawscene.cpp
index f7b916a8cbd9369f243193b7bfc5066af1cecf02..9672affeae65841ae3b6e20b3a9c50d653a03316 100644 (file)
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "main.h" // for g_settings
 #include "settings.h"
 #include "clouds.h"
+#include "clientmap.h"
 #include "util/timetaker.h"
 
 typedef enum {
@@ -426,6 +427,13 @@ void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr,
                bool draw_crosshair = ((player->hud_flags & HUD_FLAG_CROSSHAIR_VISIBLE) &&
                                (camera.getCameraMode() != CAMERA_MODE_THIRD_FRONT));
 
+#ifdef HAVE_TOUCHSCREENGUI
+               try {
+                       draw_crosshair = !g_settings->getBool("touchtarget");
+               }
+               catch(SettingNotFoundException) {}
+#endif
+
                std::string draw_mode = g_settings->get("3d_mode");
 
                smgr->drawAll();
@@ -458,6 +466,14 @@ void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr,
                        draw_plain(camera, show_hud, hud, hilightboxes, driver,
                                        draw_wield_tool, client, guienv);
                }
+
+               /*
+                       Post effects
+               */
+               {
+                       client.getEnv().getClientMap().renderPostFx(camera.getCameraMode());
+               }
+
                //TODO how to make those 3d too
                if (show_hud)
                {