From de509d05e629566daa6953b4845077e8ad07d98a Mon Sep 17 00:00:00 2001 From: ROllerozxa Date: Sun, 31 Jul 2022 15:18:04 +0200 Subject: [PATCH] Fix Android blank screen (#12604) Hardcode the variables to 0 on Android --- src/client/renderingengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index ea2dbfa80..9698b63bb 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -86,8 +86,12 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver) // Resolution selection bool fullscreen = g_settings->getBool("fullscreen"); +#ifdef __ANDROID__ + u16 screen_w = 0, screen_h = 0; +#else u16 screen_w = std::max(g_settings->getU16("screen_w"), 1); u16 screen_h = std::max(g_settings->getU16("screen_h"), 1); +#endif // bpp, fsaa, vsync bool vsync = g_settings->getBool("vsync");