11using HarmonyLib ;
22using KSP . Game ;
3+ using KSP . Logging ;
34using System . Globalization ;
45using UnityEngine . UI ;
56
@@ -11,27 +12,27 @@ internal class SaveLoadDateTimeFix_Patch
1112 [ HarmonyPrefix ]
1213 public static void SaveLoadDialogFileEntry_Initialize ( SaveLoadDialogFileEntry __instance , ExtendedSaveFileInfo fileInfo , bool loading , bool isLastPlayed )
1314 {
14- CultureInfo . DefaultThreadCurrentCulture = Thread . CurrentThread . CurrentUICulture ;
15+ Thread . CurrentThread . CurrentCulture = Thread . CurrentThread . CurrentUICulture ;
1516 }
1617
1718 [ HarmonyPatch ( typeof ( SaveLoadDialog ) , nameof ( SaveLoadDialog . UpdateLoadMenuGameInformation ) , new Type [ ] { typeof ( ExtendedSaveFileInfo ) , typeof ( Image ) } ) ]
1819 [ HarmonyPrefix ]
1920 public static void SaveLoadDialog_UpdateLoadMenuGameInformation ( SaveLoadDialog __instance , ExtendedSaveFileInfo fileInfo , Image thumnailScreenshot )
2021 {
21- CultureInfo . DefaultThreadCurrentCulture = Thread . CurrentThread . CurrentUICulture ;
22+ Thread . CurrentThread . CurrentCulture = Thread . CurrentThread . CurrentUICulture ;
2223 }
2324
2425 [ HarmonyPatch ( typeof ( CampaignLoadMenu ) , nameof ( CampaignLoadMenu . UpdateLoadMenuGameInformation ) , new Type [ ] { typeof ( ExtendedSaveFileInfo ) , typeof ( Image ) } ) ]
2526 [ HarmonyPrefix ]
2627 public static void CampaignLoadMenu_UpdateLoadMenuGameInformation ( CampaignLoadMenu __instance , ExtendedSaveFileInfo fileInfo , Image thumnailScreenshot )
2728 {
28- CultureInfo . DefaultThreadCurrentCulture = Thread . CurrentThread . CurrentUICulture ;
29+ Thread . CurrentThread . CurrentCulture = Thread . CurrentThread . CurrentUICulture ;
2930 }
3031
3132 [ HarmonyPatch ( typeof ( CampaignTileEntry ) , nameof ( CampaignTileEntry . Initialize ) , new Type [ ] { typeof ( ExtendedSaveFileInfo ) , typeof ( CampaignLoadMenu ) , typeof ( CampaignMenu ) } ) ]
3233 [ HarmonyPrefix ]
3334 public static void CampaignTileEntry_UpdateLoadMenuGameInformation ( CampaignTileEntry __instance , ExtendedSaveFileInfo fileInfo , CampaignLoadMenu loadMenu , CampaignMenu campaignMenu )
3435 {
35- CultureInfo . DefaultThreadCurrentCulture = Thread . CurrentThread . CurrentUICulture ;
36+ Thread . CurrentThread . CurrentCulture = Thread . CurrentThread . CurrentUICulture ;
3637 }
3738}
0 commit comments