diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-04 19:40:01 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-04 19:40:01 +0100 |
commit | b38223f662e8e5202516079c1e5882121a2fe698 (patch) | |
tree | 7646c0536e35d58b7cf92af305327b81ef1635dd /src/core/arm | |
parent | cmake: Add CopyYuzuUnicornDeps script. (diff) | |
download | yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar.gz yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar.bz2 yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar.lz yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar.xz yuzu-b38223f662e8e5202516079c1e5882121a2fe698.tar.zst yuzu-b38223f662e8e5202516079c1e5882121a2fe698.zip |
Diffstat (limited to 'src/core/arm')
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index 92aef0654..1d15152e5 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -10,6 +10,22 @@ #include "core/core_timing.h" #include "core/hle/kernel/svc.h" +// Load Unicorn DLL once on Windows using RAII +#ifdef _WIN32 +#include <unicorn_dynload.h> +struct LoadDll { +private: + LoadDll() { + ASSERT(uc_dyn_load(NULL, 0)); + } + ~LoadDll() { + ASSERT(uc_dyn_free()); + } + static LoadDll g_load_dll; +}; +LoadDll LoadDll::g_load_dll; +#endif + #define CHECKED(expr) \ do { \ if (auto _cerr = (expr)) { \ |