mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-14 23:05:17 +00:00
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 a new issue