mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 10:29:22 +00:00
Too many changes
This commit is contained in:
parent
45557943c4
commit
a22e5992d0
72 changed files with 1064 additions and 927 deletions
|
@ -25,8 +25,7 @@ namespace ml_bft
|
|||
if(MetaPort.Instance.isUsingVr)
|
||||
SetupHandlers();
|
||||
|
||||
VRModeSwitchEvents.OnInitializeXR.AddListener(this.OnSwitchToVR);
|
||||
VRModeSwitchEvents.OnDeinitializeXR.AddListener(this.OnSwitchToDesktop);
|
||||
VRModeSwitchEvents.OnCompletedVRModeSwitch.AddListener(this.OnVRModeSwitch);
|
||||
|
||||
Settings.OnSkeletalInputChanged.AddListener(this.OnSkeletalInputChanged);
|
||||
|
||||
|
@ -39,6 +38,8 @@ namespace ml_bft
|
|||
|
||||
RemoveHandlers();
|
||||
|
||||
VRModeSwitchEvents.OnCompletedVRModeSwitch.RemoveListener(this.OnVRModeSwitch);
|
||||
|
||||
Settings.OnSkeletalInputChanged.RemoveListener(this.OnSkeletalInputChanged);
|
||||
|
||||
GameEvents.OnInputUpdate.RemoveListener(this.OnInputUpdate);
|
||||
|
@ -133,23 +134,14 @@ namespace ml_bft
|
|||
}
|
||||
}
|
||||
|
||||
void OnSwitchToVR()
|
||||
void OnVRModeSwitch(bool p_state)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetupHandlers();
|
||||
}
|
||||
catch(System.Exception e)
|
||||
{
|
||||
MelonLoader.MelonLogger.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
void OnSwitchToDesktop()
|
||||
{
|
||||
try
|
||||
{
|
||||
RemoveHandlers();
|
||||
if(Utils.IsInVR())
|
||||
SetupHandlers();
|
||||
else
|
||||
RemoveHandlers();
|
||||
}
|
||||
catch(System.Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue