Skip to content

Commit

Permalink
feat: Implement VirtualMachine::GetSingleton()
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita committed Nov 10, 2023
1 parent 8b530a2 commit 0950d46
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CommonLibSF/src/RE/V/VirtualMachine.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "RE/V/VirtualMachine.h"
#include "RE/G/GameVM.h"

namespace RE::BSScript::Internal
{
VirtualMachine* VirtualMachine::GetSingleton()
{
auto vm = GameVM::GetSingleton();
return vm ? static_cast<VirtualMachine*>(vm->impl.get()) : nullptr;
}
}

0 comments on commit 0950d46

Please sign in to comment.