summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/unicorn/arm_unicorn.cpp16
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)) { \