mirror of https://git.suyu.dev/suyu/suyu
arm_unicorn: Load/release unicorn DLL.
This commit is contained in:
parent
45bdc53b8f
commit
b38223f662
|
@ -10,6 +10,22 @@
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/kernel/svc.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) \
|
#define CHECKED(expr) \
|
||||||
do { \
|
do { \
|
||||||
if (auto _cerr = (expr)) { \
|
if (auto _cerr = (expr)) { \
|
||||||
|
|
Loading…
Reference in New Issue