mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[DesktopVRSwitch] Prevent SteamVR_Behaviour from closing game.
Was going to use my own event and switch before quit, but SteamVR_Behaviour was the one doing it the entire time. Very convenient for me.
This commit is contained in:
parent
52d4ef3279
commit
337134d2b5
3 changed files with 34 additions and 7 deletions
|
@ -32,7 +32,10 @@ public class DesktopVRSwitch : MelonMod
|
|||
Category.CreateEntry("Use Transition on Switch", true, description: "Should the world transition play on VRMode switch?");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryRenderVRGameView =
|
||||
Category.CreateEntry("Render VR Game View", true, description: "Should the VR view be displayed in the game window?");
|
||||
Category.CreateEntry("Render VR Game View", true, description: "Should the VR view be displayed in the game window after VRMode switch?");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntrySwitchToDesktopOnExit =
|
||||
Category.CreateEntry("Switch to Desktop on SteamVR Exit", true, description: "Should the game switch to Desktop when SteamVR quits?");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
|
@ -52,6 +55,9 @@ public class DesktopVRSwitch : MelonMod
|
|||
ApplyPatches(typeof(HarmonyPatches.CVRWorldPatches));
|
||||
// cohtml gamepad handling nuke
|
||||
ApplyPatches(typeof(HarmonyPatches.CohtmlUISystemPatches));
|
||||
|
||||
// prevent steamvr behaviour from closing game
|
||||
ApplyPatches(typeof(HarmonyPatches.SteamVRBehaviourPatches));
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue