aboutsummaryrefslogtreecommitdiff
path: root/src/client/clientlauncher.cpp
diff options
context:
space:
mode:
authorTheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com>2021-09-26 12:04:09 -0400
committerGitHub <noreply@github.com>2021-09-26 18:04:09 +0200
commit3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab (patch)
treec60d824fdbd211710d51b89f60913fccc0ee9d76 /src/client/clientlauncher.cpp
parent9f85862b7c0d2fd6fe964699bbeabc824026e848 (diff)
downloadminetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.gz
minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.bz2
minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.zip
Touch UI support for desktop builds (#10729)
Diffstat (limited to 'src/client/clientlauncher.cpp')
-rw-r--r--src/client/clientlauncher.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index 6ab610670..95be72ca0 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -38,9 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#if USE_SOUND
#include "sound_openal.h"
#endif
-#ifdef __ANDROID__
- #include "porting.h"
-#endif
/* mainmenumanager.h
*/
@@ -147,8 +144,8 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255, 0, 0, 0));
skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 70, 120, 50));
skin->setColor(gui::EGDC_HIGH_LIGHT_TEXT, video::SColor(255, 255, 255, 255));
-#ifdef __ANDROID__
- float density = porting::getDisplayDensity();
+#ifdef HAVE_TOUCHSCREENGUI
+ float density = RenderingEngine::getDisplayDensity();
skin->setSize(gui::EGDS_CHECK_BOX_WIDTH, (s32)(17.0f * density));
skin->setSize(gui::EGDS_SCROLLBAR_SIZE, (s32)(14.0f * density));
skin->setSize(gui::EGDS_WINDOW_BUTTON_WIDTH, (s32)(15.0f * density));