mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
check for internet before starting a mp game to avoid freeze (#6679)
* Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected Many thanks to SomeTroglodyte for most of the code and for explanations * check for internet before starting a mp game to avoid freeze Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected. Many thanks to SomeTroglodyte for most of the code and for explanations. A slight modification has been done to the code to catch an error caused by InetAddress * Revert "Merge remote-tracking branch 'origin/master-noInternet' into master-noInternet" This reverts commitbd6474b50d
, reversing changes made tof52ad60b51
.
This commit is contained in:
@ -35,15 +35,15 @@ open class AndroidLauncher : AndroidApplication() {
|
||||
val fontFamily = settings.fontFamily
|
||||
|
||||
// Manage orientation lock
|
||||
val limitOrientationsHelper = LimitOrientationsHelperAndroid(this)
|
||||
limitOrientationsHelper.allowPortrait(settings.allowAndroidPortrait)
|
||||
val platformSpecificHelper = PlatformSpecificHelpersAndroid(this)
|
||||
platformSpecificHelper.allowPortrait(settings.allowAndroidPortrait)
|
||||
|
||||
val androidParameters = UncivGameParameters(
|
||||
version = BuildConfig.VERSION_NAME,
|
||||
crashReportSysInfo = CrashReportSysInfoAndroid,
|
||||
fontImplementation = NativeFontAndroid(Fonts.ORIGINAL_FONT_SIZE.toInt(), fontFamily),
|
||||
customSaveLocationHelper = customSaveLocationHelper,
|
||||
limitOrientationsHelper = limitOrientationsHelper
|
||||
platformSpecificHelper = platformSpecificHelper
|
||||
)
|
||||
|
||||
game = UncivGame(androidParameters)
|
||||
|
Reference in New Issue
Block a user