1515// along with this program; if not, write to the Free Software
1616// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1717
18- #ifdef ANDROID
18+ #ifdef MOBILE_STK
1919
2020#include " config/user_config.hpp"
2121#include " graphics/irr_driver.hpp"
2222#include " utils/log.hpp"
2323
24+ #ifdef ANDROID
2425#include " ../../../lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.h"
26+ #endif
2527
2628extern int main (int argc, char *argv[]);
2729
2830struct android_app * global_android_app;
2931
30- void override_default_params ()
32+ void override_default_params_for_mobile ()
3133{
3234 // It has an effect only on the first run, when config file is created.
3335 // So that we can still modify these params in STK options and user's
@@ -42,7 +44,8 @@ void override_default_params()
4244
4345 // Enable multitouch race GUI
4446 UserConfigParams::m_multitouch_draw_gui = true ;
45-
47+
48+ #ifdef ANDROID
4649 // Set multitouch device scale depending on actual screen size
4750 int32_t screen_size = AConfiguration_getScreenSize (global_android_app->config );
4851
@@ -67,7 +70,8 @@ void override_default_params()
6770 default :
6871 break ;
6972 }
70-
73+ #endif
74+
7175 // Enable screen keyboard
7276 UserConfigParams::m_screen_keyboard = 1 ;
7377
@@ -82,6 +86,7 @@ void override_default_params()
8286 UserConfigParams::m_enforce_current_player = true ;
8387}
8488
89+ #ifdef ANDROID
8590void android_main (struct android_app * app)
8691{
8792 Log::info (" AndroidMain" , " Loading application..." );
@@ -92,7 +97,7 @@ void android_main(struct android_app* app)
9297 CIrrDeviceAndroid::onCreate ();
9398
9499 app_dummy ();
95- override_default_params ();
100+ override_default_params_for_mobile ();
96101
97102 main (0 , {});
98103
@@ -106,5 +111,6 @@ void android_main(struct android_app* app)
106111 fflush (NULL );
107112 _exit (0 );
108113}
114+ #endif
109115
110116#endif
0 commit comments