JSL-Related Improvements (#679)

* *don't* cause a stack overflow when polling split controller

* update JSL (DualSense Edge support)

add ability to update controller bindings

* (temporarily) get rid of everything joy-con pair related

* prepare the new controller

update JSL

* implementation of joycon pair

* properly do the material

* finish implementation
This commit is contained in:
minenice55
2024-02-04 01:54:32 -05:00
committed by minenice55
parent a9017bf06c
commit a874b18ccb
20 changed files with 959 additions and 699 deletions

View File

@ -67,7 +67,22 @@ namespace HeavenStudio.Common
if (File.Exists(Application.persistentDataPath + "/settings.json"))
{
string json = File.ReadAllText(Application.persistentDataPath + "/settings.json");
gameSettings = JsonUtility.FromJson<GameSettings>(json);
if (json == "")
{
GlobalGameManager.IsFirstBoot = true;
CreateDefaultSettings();
return;
}
try
{
gameSettings = JsonConvert.DeserializeObject<GameSettings>(json);
}
catch (Exception e)
{
Debug.LogError($"Error while loading settings, creating default settings;\n{e.Message}");
GlobalGameManager.IsFirstBoot = true;
CreateDefaultSettings();
}
}
else
{