mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 00:37:37 +02:00
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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user