mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: .NET script loader not initializing correctly on macOS
This commit is contained in:
@@ -63,6 +63,13 @@ namespace hex::script::loader {
|
||||
if (netHostLibrary != nullptr)
|
||||
break;
|
||||
}
|
||||
if (netHostLibrary == nullptr) {
|
||||
for (const auto &librariesPath : fs::getDefaultPaths(fs::ImHexPath::Libraries)) {
|
||||
netHostLibrary = loadLibrary((librariesPath / "libnethost.dylib").c_str());
|
||||
if (netHostLibrary != nullptr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (netHostLibrary == nullptr) {
|
||||
@@ -75,7 +82,7 @@ namespace hex::script::loader {
|
||||
std::array<char_t, 300> buffer = { };
|
||||
size_t bufferSize = buffer.size();
|
||||
|
||||
auto result = get_hostfxr_path_ptr(buffer.data(), &bufferSize, nullptr);
|
||||
u32 result = get_hostfxr_path_ptr(buffer.data(), &bufferSize, nullptr);
|
||||
if (result != 0) {
|
||||
log::error(hex::format("Could not get hostfxr path! 0x{:X}", result));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user