@@ -819,9 +819,12 @@ protected virtual bool IsGameConfigIdValid()
819
819
|| GamePreset . SubChannelID == null )
820
820
return true ;
821
821
822
- if ( ! GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( ChannelIdKeyName )
823
- || ! GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( SubChannelIdKeyName )
824
- || ! GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( CpsKeyName ) )
822
+ bool isContainsChannelId = GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( ChannelIdKeyName ) ;
823
+ bool isContainsSubChannelId = GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( SubChannelIdKeyName ) ;
824
+ bool isCps = GameIniVersion [ _defaultIniVersionSection ] . ContainsKey ( CpsKeyName ) ;
825
+ if ( ! isContainsChannelId
826
+ || ! isContainsSubChannelId
827
+ || ! isCps )
825
828
return false ;
826
829
827
830
string ? channelIdCurrent = GameIniVersion [ _defaultIniVersionSection ] [ ChannelIdKeyName ] . ToString ( ) ;
@@ -992,20 +995,24 @@ public void UpdateGameVersion(GameVersion? version, bool saveValue = true)
992
995
993
996
public void UpdateGameChannels ( bool saveValue = true )
994
997
{
995
- bool isBilibili = GamePreset . ZoneName == "Bilibili" ;
996
998
GameIniVersion [ _defaultIniVersionSection ] [ "channel" ] = gameChannelID ;
997
999
GameIniVersion [ _defaultIniVersionSection ] [ "sub_channel" ] = gameSubChannelID ;
998
1000
GameIniVersion [ _defaultIniVersionSection ] [ "cps" ] = gameCps ;
999
-
1001
+
1002
+ /* Disable these lines as these will trigger some bugs (like Endless "Broken config.ini" dialog)
1003
+ * and causes the cps field to be missing for other non-Bilibili games
1004
+ *
1000
1005
// Remove the contains section if the client is not Bilibili and it does have the value.
1001
1006
// This to avoid an issue with HSR config.ini detection
1007
+ bool isBilibili = GamePreset.ZoneName == "Bilibili";
1002
1008
if ( !isBilibili
1003
1009
&& GameIniVersion.ContainsSection(_defaultIniVersionSection)
1004
1010
&& GameIniVersion[_defaultIniVersionSection].ContainsKey("cps")
1005
1011
&& GameIniVersion[_defaultIniVersionSection]["cps"].ToString().IndexOf("bilibili", StringComparison.OrdinalIgnoreCase) >= 0)
1006
1012
{
1007
1013
GameIniVersion[_defaultIniVersionSection].Remove("cps");
1008
1014
}
1015
+ */
1009
1016
1010
1017
if ( saveValue )
1011
1018
{
0 commit comments