2022-07-30 12:24:03 -04:00
|
|
|
#pragma once
|
|
|
|
|
2022-10-30 14:59:20 -04:00
|
|
|
#include <cstring>
|
2022-07-30 12:24:03 -04:00
|
|
|
#include <mach-o/dyld.h>
|
|
|
|
#include <type_traits>
|
|
|
|
#include <typeinfo>
|
2023-02-26 07:22:50 -05:00
|
|
|
#include "ItaniumCast.hpp"
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
namespace geode {
|
2022-10-30 14:59:20 -04:00
|
|
|
using dylib_t = void*;
|
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
struct PlatformInfo {
|
2022-10-30 14:59:20 -04:00
|
|
|
dylib_t m_dylib;
|
2022-07-30 12:24:03 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace geode::base {
|
2022-10-30 14:59:20 -04:00
|
|
|
GEODE_NOINLINE inline uintptr_t get() {
|
|
|
|
static uintptr_t base = _dyld_get_image_vmaddr_slide(0) + 0x100000000;
|
|
|
|
return base;
|
|
|
|
}
|
2022-07-30 12:24:03 -04:00
|
|
|
}
|