1
0
Fork 0
forked from suyu/suyu

arm_unicorn: Load/release unicorn DLL.

This commit is contained in:
bunnei 2018-01-04 13:40:01 -05:00
parent 45bdc53b8f
commit b38223f662

View file

@ -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)) { \