diff --git a/launcher/firstLaunch/firstlaunch_moc.cpp b/launcher/firstLaunch/firstlaunch_moc.cpp index 52aebfe1b..f96c0593c 100644 --- a/launcher/firstLaunch/firstlaunch_moc.cpp +++ b/launcher/firstLaunch/firstlaunch_moc.cpp @@ -102,6 +102,7 @@ void FirstLaunchView::on_comboBoxLanguage_currentIndexChanged(int index) void FirstLaunchView::enterSetup() { + setupPlatformSettings(); Languages::fillLanguages(ui->listWidgetLanguage, false); } @@ -158,6 +159,19 @@ void FirstLaunchView::exitSetup() mainWindow->exitSetup(); } +// Initial platform-dependend settings +void FirstLaunchView::setupPlatformSettings() +{ +#if defined(VCMI_MOBILE) + bool touchscreenMode = true; +#else + bool touchscreenMode = false +#endif + + Settings node = settings.write["battle"]["touchscreenMode"]; + node->Bool() = touchscreenMode; +} + // Tab Language void FirstLaunchView::languageSelected(const QString & selectedLanguage) { diff --git a/launcher/firstLaunch/firstlaunch_moc.h b/launcher/firstLaunch/firstlaunch_moc.h index f2ca56eb0..74ccec3eb 100644 --- a/launcher/firstLaunch/firstlaunch_moc.h +++ b/launcher/firstLaunch/firstlaunch_moc.h @@ -37,6 +37,9 @@ class FirstLaunchView : public QWidget void activateTabHeroesData(); void activateTabModPreset(); void exitSetup(); + + // Initial platform-dependend settings + void setupPlatformSettings(); // Tab Language void languageSelected(const QString & languageCode);