forked from suyu/suyu
arm_unicorn: Load/release unicorn DLL.
This commit is contained in:
parent
45bdc53b8f
commit
b38223f662
1 changed files with 16 additions and 0 deletions
|
@ -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)) { \
|
||||
|
|
Loading…
Reference in a new issue