diff options
author | stujones11 <stujones111@gmail.com> | 2017-12-06 20:36:29 +0000 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2018-03-11 16:56:27 +0100 |
commit | 22a891a925d68a096420d3383a2e31b58e3eb244 (patch) | |
tree | 21de815d25b2f9727aa019f063566426d265fa74 /src/client | |
parent | 69247ca2233d1b2e77485b8d32aca41c7e525e74 (diff) | |
download | minetest-22a891a925d68a096420d3383a2e31b58e3eb244.tar.gz minetest-22a891a925d68a096420d3383a2e31b58e3eb244.tar.bz2 minetest-22a891a925d68a096420d3383a2e31b58e3eb244.zip |
Android build fixes for c++11
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/clientlauncher.cpp | 2 | ||||
-rw-r--r-- | src/client/renderingengine.cpp | 15 | ||||
-rw-r--r-- | src/client/tile.cpp | 2 | ||||
-rw-r--r-- | src/client/tile.h | 6 |
4 files changed, 22 insertions, 3 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 741a90d9f..b02f1b438 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -215,7 +215,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map")); #ifdef HAVE_TOUCHSCREENGUI - receiver->m_touchscreengui = new TouchScreenGUI(device, receiver); + receiver->m_touchscreengui = new TouchScreenGUI(RenderingEngine::get_raw_device(), receiver); g_touchscreengui = receiver->m_touchscreengui; #endif diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 94c9c5ef2..72c1ccfbd 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -45,6 +45,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <X11/Xutil.h> #endif +#ifdef __ANDROID__ +#include "filesys.h" +#endif + RenderingEngine *RenderingEngine::s_singleton = nullptr; RenderingEngine::RenderingEngine(IEventReceiver *receiver) @@ -567,4 +571,15 @@ v2u32 RenderingEngine::getDisplaySize() return deskres; } + +#else // __ANDROID__ +float RenderingEngine::getDisplayDensity() +{ + return porting::getDisplayDensity(); +} + +v2u32 RenderingEngine::getDisplaySize() +{ + return porting::getDisplaySize(); +} #endif // __ANDROID__ diff --git a/src/client/tile.cpp b/src/client/tile.cpp index a88163a50..ddc0de907 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -794,7 +794,7 @@ video::ITexture* TextureSource::generateTextureFromMesh( g_settings->getBool("inventory_image_hack") ) { // Get a scene manager - scene::ISceneManager *smgr_main = m_device->getSceneManager(); + scene::ISceneManager *smgr_main = RenderingEngine::get_raw_device()->getSceneManager(); sanity_check(smgr_main); scene::ISceneManager *smgr = smgr_main->createNewSceneManager(); sanity_check(smgr); diff --git a/src/client/tile.h b/src/client/tile.h index c21594206..b1f6d6ac9 100644 --- a/src/client/tile.h +++ b/src/client/tile.h @@ -28,6 +28,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <memory> #include "util/numeric.h" +#if __ANDROID__ +#include <IVideoDriver.h> +#endif + class IGameDef; struct TileSpec; struct TileDef; @@ -153,7 +157,7 @@ public: IWritableTextureSource *createTextureSource(); #ifdef __ANDROID__ -video::IImage * Align2Npot2(video::IImage * image, video::IVideoDriver* driver); +video::IImage * Align2Npot2(video::IImage * image, irr::video::IVideoDriver* driver); #endif enum MaterialType{ |