4
Fork 0

Improved video interruption patch

remove-levelsystem
Eddoursul 5 months ago
parent e5e81477e6
commit e9d5357d67
  1. BIN
      SKSE/Plugins/EnderalSE.dll
  2. 10
      source/Enderal DLL/src/BinkInterruptPatch.h

BIN
SKSE/Plugins/EnderalSE.dll (Stored with Git LFS)

Binary file not shown.

@ -7,9 +7,11 @@ namespace BinkInterruptPatch
{
struct BinkListener
{
static bool thunk()
static bool thunk(RE::BGSMoviePlayer* moviePlayer, bool bInterruptible)
{
auto result = func();
if (!bInterruptible) {
return true;
}
if (SKSE::WinAPI::GetKeyState(VK_SPACE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_ESCAPE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_RBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LMENU) & 0x8000) {
return false;
@ -26,14 +28,14 @@ namespace BinkInterruptPatch
}
}
return result;
return true;
}
static inline REL::Relocation<decltype(thunk)> func;
};
void Install()
{
REL::Relocation<std::uintptr_t> target{ REL::RelocationID(87887, 90256), REL::Relocate(0x9F, 0x16F) };
REL::Relocation<std::uintptr_t> target{ REL::RelocationID(87890, 90259), REL::Relocate(0x22, 0x21) };
auto& trampoline = SKSE::GetTrampoline();
SKSE::AllocTrampoline(14);

Loading…
Cancel
Save