From 30ede3956c74b7a86e97ad416377e770115c1099 Mon Sep 17 00:00:00 2001 From: jianmingyong Date: Wed, 15 Feb 2017 22:02:27 +0800 Subject: [PATCH] Update the updater check codes. --- .../Screens/MainMenu/MainMenuScreen.vb | 25 +++++++++++------- 2.5DHero/2.5DHero/Updater.exe | Bin 37888 -> 37888 bytes 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/2.5DHero/2.5DHero/Screens/MainMenu/MainMenuScreen.vb b/2.5DHero/2.5DHero/Screens/MainMenu/MainMenuScreen.vb index b91e74ecb..35738aaf0 100644 --- a/2.5DHero/2.5DHero/Screens/MainMenu/MainMenuScreen.vb +++ b/2.5DHero/2.5DHero/Screens/MainMenu/MainMenuScreen.vb @@ -1,5 +1,6 @@ Imports System.Net Imports System.Net.Cache +Imports System.Threading.Tasks Public Class MainMenuScreen @@ -82,20 +83,26 @@ Public Class MainMenuScreen GameJolt.Emblem.ClearOnlineSpriteCache() Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType) + UpdateCheck() + End Sub + + Private Sub UpdateCheck() Try If Not GameController.UpdateChecked Then Logger.Debug("---Check Version---") - Dim Updater As New Process() - Updater.StartInfo = New ProcessStartInfo("Updater.exe") - Updater.Start() - Updater.WaitForExit() + Task.Factory.StartNew(Sub() + Dim Updater As New Process() + Updater.StartInfo = New ProcessStartInfo("Updater.exe") + Updater.Start() + Updater.WaitForExit() - If Updater.ExitCode = 1 Then - Environment.Exit(0) - Else - GameController.UpdateChecked = True - End If + If Updater.ExitCode = 1 Then + Core.GameInstance.Exit() + Else + GameController.UpdateChecked = True + End If + End Sub) End If Catch ex As Exception End Try diff --git a/2.5DHero/2.5DHero/Updater.exe b/2.5DHero/2.5DHero/Updater.exe index a9985a144b05d15aa05003efbef83b17761d71f0..9997e668d162d451dd655eacdb500d8f8f7fcee3 100644 GIT binary patch delta 3239 zcmZu!3viTI75?tO|9|)2P1s~NRzjsfCK`+=u@8zaDM@KXi+cxC&btn^DjI{C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