diff --git a/scripts/enderalfunctions.pex b/scripts/enderalfunctions.pex index 79eb6142a..a1037a6c2 100644 Binary files a/scripts/enderalfunctions.pex and b/scripts/enderalfunctions.pex differ diff --git a/source/Enderal DLL/src/PapyrusFunctions.h b/source/Enderal DLL/src/PapyrusFunctions.h index e878e564d..c2fb0e011 100644 --- a/source/Enderal DLL/src/PapyrusFunctions.h +++ b/source/Enderal DLL/src/PapyrusFunctions.h @@ -170,6 +170,11 @@ namespace Papyrus::PapyrusFunctions return iResult; } + inline bool IsVR(RE::StaticFunctionTag*) + { + return REL::Module::IsVR(); + } + inline void Bind(VM& a_vm) { BIND(CreatePotion); @@ -194,5 +199,7 @@ namespace Papyrus::PapyrusFunctions logger::info("{}", "Registered ComputeNeededExp"sv); BIND(MoveItemsToCountByKeyword); logger::info("{}", "Registered MoveItemsToCountByKeyword"sv); + BIND(IsVR); + logger::info("{}", "Registered IsVR"sv); } } diff --git a/source/scripts/enderalfunctions.psc b/source/scripts/enderalfunctions.psc index 3b2a0d229..fac56db76 100644 --- a/source/scripts/enderalfunctions.psc +++ b/source/scripts/enderalfunctions.psc @@ -38,11 +38,6 @@ String Function GetPlayerClassNameGlobal() global return (AffinityQuest.GetAlias(0) as _00E_AffinityControl).GetPlayerClassName() endfunction -bool function IsVR() global - ; Current VR build 2.0.12 (game version 1.4.15) - return SKSE.GetVersionRelease() == 60 -endfunction - bool function TextInputEnabled() global return SKSE.GetVersion() && ! Game.UsingGamepad() && ! IsVR() endfunction @@ -50,3 +45,5 @@ endfunction bool function VideoSupport() global return Debug.GetPlatformName() != "Orbis" && ! IsVR() endfunction + +bool function IsVR() native global