diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs index dc8d979..28638fa 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs @@ -132,6 +132,13 @@ namespace AxibugEmuOnline.Client.ClientCore yield return request.SendWebRequest; if (!request.downloadHandler.isDone) yield break; + + if (request.downloadHandler.Err != null) + { + App.log.Error(request.downloadHandler.Err); + yield break; + } + Resp_CheckStandInfo resp = JsonUtility.FromJson(request.downloadHandler.text); /*UnityWebRequest request = UnityWebRequest.Get($"{App.httpAPI.WebSiteApi}/CheckStandInfo?platform={platform}&version={Application.version}"); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs index 844cd2b..d4bd6df 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs @@ -151,15 +151,9 @@ public static class AxiHttp { if (!dictIP2Address.ContainsKey(str)) { - try - { - IPAddress ip = Dns.GetHostEntry(str).AddressList[0]; - dictIP2Address[str] = ip; - } - catch - { - return null; - } + IPHostEntry host = Dns.GetHostEntry(str); + IPAddress ip = host.AddressList[0]; + dictIP2Address[str] = ip; } return dictIP2Address[str]; } @@ -232,11 +226,12 @@ public static class AxiHttp string strRelativePath = ""; bool bSSL = false; bool foward_302 = true; + string ourErrMsg = ""; - if (!ParseURI(strURI, ref bSSL, ref strHost, ref strIP, ref port, ref strRelativePath)) + if (!ParseURI(strURI, ref bSSL, ref strHost, ref strIP, ref port, ref strRelativePath,ref ourErrMsg)) { Log("ParseURI False"); - respinfo.Err = "ParseURI False"; + respinfo.Err = ourErrMsg; respinfo.code = 0; respinfo.isDone = true; return; @@ -531,11 +526,12 @@ public static class AxiHttp string strRelativePath = ""; bool bSSL = false; bool foward_302 = true; + string ourErrMsg = ""; - if (!ParseURI(strURI, ref bSSL, ref strHost, ref strIP, ref port, ref strRelativePath)) + if (!ParseURI(strURI, ref bSSL, ref strHost, ref strIP, ref port, ref strRelativePath, ref ourErrMsg)) { Log("ParseURI False"); - respinfo.Err = "ParseURI False"; + respinfo.Err = ourErrMsg; respinfo.code = 0; respinfo.isDone = true; return; @@ -980,7 +976,13 @@ public static class AxiHttp { return true; } - public static bool ParseURI(string strURI, ref bool bIsSSL, ref string strHost, ref string strIP, ref int Port, ref string strRelativePath) + public static bool ParseURI(string strURI, + ref bool bIsSSL, + ref string strHost, + ref string strIP, + ref int Port, + ref string strRelativePath, + ref string errMsg) { string strAddressRet; string strPortRet; @@ -1013,7 +1015,10 @@ public static class AxiHttp strRelativePathRet = strLeft.Substring(nIndexRelative, strLeft.Length - nIndexRelative); } else + { + errMsg = "Err Url"; return false; + } } else { @@ -1025,18 +1030,19 @@ public static class AxiHttp strRelativePathRet = strLeft.Substring(nIndexRelative, strLeft.Length - nIndexRelative); } else + { + errMsg = "Err Url"; return false; + } } strHost = strAddressRet; try { - //IPHostEntry hostinfo = Dns.GetHostEntry(strAddressRet); - //IPAddress[] aryIP = hostinfo.AddressList; - //strIPRet = aryIP[0].ToString(); strIPRet = GetDnsIP(strAddressRet).ToString(); } - catch + catch(Exception ex) { + errMsg = ex.ToString(); return false; } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/FilterManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/FilterManager.cs index 4ae1143..4964462 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/FilterManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/FilterManager.cs @@ -50,6 +50,13 @@ namespace AxibugEmuOnline.Client private RenderTexture result = null; public Texture ExecuteFilterRender(Texture src) { + +#if UNITY_PSP2 + if (result == null) + { + result = RenderTexture.GetTemporary(Screen.width / 2, Screen.height / 2); + } +#else if (result == null) { result = RenderTexture.GetTemporary(Screen.width, Screen.height); @@ -59,7 +66,7 @@ namespace AxibugEmuOnline.Client RenderTexture.ReleaseTemporary(result); result = RenderTexture.GetTemporary(Screen.width, Screen.height); } - +#endif bool anyFilterEnable = false; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs index a0b35c0..aed2853 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs @@ -63,6 +63,13 @@ namespace AxibugEmuOnline.Client yield break; } + if (request.downloadHandler.Err != null) + { + App.log.Error(request.downloadHandler.Err); + callback.Invoke(null); + yield break; + } + /* UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}&SearchKey={searchKey}"); yield return request.SendWebRequest(); @@ -85,6 +92,13 @@ namespace AxibugEmuOnline.Client callback.Invoke(null); yield break; } + + if (request.downloadHandler.Err != null) + { + App.log.Error(request.downloadHandler.Err); + callback.Invoke(null); + yield break; + } /* UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}"); yield return request.SendWebRequest(); @@ -110,6 +124,13 @@ namespace AxibugEmuOnline.Client yield break; } + if (request.downloadHandler.Err != null) + { + App.log.Error(request.downloadHandler.Err); + callback.Invoke(null); + yield break; + } + /* UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/RomInfo?PType={PlatformType.Nes}&RomID={RomID}"); yield return request.SendWebRequest();