Improved video interruption patch
This commit is contained in:
parent
e5e81477e6
commit
e9d5357d67
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
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…
Reference in New Issue
Block a user