Enable multitouch gui only if touchscreen is available
This commit is contained in:
parent
e26239e364
commit
959f33223e
@ -40,9 +40,14 @@ void override_default_params()
|
|||||||
// Disable advanced lighting by default to make the game playable
|
// Disable advanced lighting by default to make the game playable
|
||||||
UserConfigParams::m_dynamic_lights = false;
|
UserConfigParams::m_dynamic_lights = false;
|
||||||
|
|
||||||
// Enable touch steering and screen keyboard
|
// Enable touch steering and screen keyboard when touchscreen is available
|
||||||
UserConfigParams::m_multitouch_enabled = true;
|
int32_t touch = AConfiguration_getTouchscreen(global_android_app->config);
|
||||||
UserConfigParams::m_screen_keyboard = true;
|
|
||||||
|
if (touch != ACONFIGURATION_TOUCHSCREEN_NOTOUCH)
|
||||||
|
{
|
||||||
|
UserConfigParams::m_multitouch_enabled = true;
|
||||||
|
UserConfigParams::m_screen_keyboard = true;
|
||||||
|
}
|
||||||
|
|
||||||
// It shouldn't matter, but STK is always run in fullscreen on android
|
// It shouldn't matter, but STK is always run in fullscreen on android
|
||||||
UserConfigParams::m_fullscreen = true;
|
UserConfigParams::m_fullscreen = true;
|
||||||
@ -62,14 +67,14 @@ void android_main(struct android_app* app)
|
|||||||
{
|
{
|
||||||
Log::info("AndroidMain", "Loading application...");
|
Log::info("AndroidMain", "Loading application...");
|
||||||
|
|
||||||
app_dummy();
|
global_android_app = app;
|
||||||
|
|
||||||
// Initialize global Android window state variables
|
// Initialize global Android window state variables
|
||||||
CIrrDeviceAndroid::onCreate();
|
CIrrDeviceAndroid::onCreate();
|
||||||
|
|
||||||
|
app_dummy();
|
||||||
override_default_params();
|
override_default_params();
|
||||||
|
|
||||||
global_android_app = app;
|
|
||||||
main(0, {});
|
main(0, {});
|
||||||
|
|
||||||
Log::info("AndroidMain", "Closing STK...");
|
Log::info("AndroidMain", "Closing STK...");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user