mirror of
https://git.chinosk6.cn/chinosk/gkms-local.git
synced 2026-02-04 17:13:59 +00:00
修复部分模拟器无效/崩溃的问题
This commit is contained in:
@@ -526,7 +526,10 @@ public:
|
||||
if (!address_.contains(funcName) || !address_[funcName]) address_[funcName] = static_cast<void*>(GetProcAddress(static_cast<HMODULE>(hmodule_), funcName.c_str()));
|
||||
#elif ANDROID_MODE || LINUX_MODE
|
||||
if (address_.find(funcName) == address_.end() || !address_[funcName]) {
|
||||
address_[funcName] = xdl_sym(hmodule_, funcName.c_str(), NULL);
|
||||
auto xdlAddr = xdl_sym(hmodule_, funcName.c_str(), NULL);
|
||||
if (!xdlAddr) {
|
||||
address_[funcName] = dlsym(hmodule_, funcName.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1797,6 +1800,19 @@ public:
|
||||
if (method) return method->Invoke<Matrix4x4>(this);
|
||||
return {};
|
||||
}
|
||||
|
||||
auto GetPixelRect() -> Rect {
|
||||
if (!this) return {};
|
||||
static Method* method;
|
||||
if (!method) method = Get("UnityEngine.CoreModule.dll")->Get("Camera")->Get<Method>("get_pixelRect");
|
||||
return method->Invoke<Rect>(this);
|
||||
}
|
||||
auto GetOrthographicSize() -> float {
|
||||
if (!this) return {};
|
||||
static Method* method;
|
||||
if (!method) method = Get("UnityEngine.CoreModule.dll")->Get("Camera")->Get<Method>("get_orthographicSize");
|
||||
return method->Invoke<float>(this);
|
||||
}
|
||||
};
|
||||
|
||||
struct Transform : Component {
|
||||
|
||||
Reference in New Issue
Block a user