fix internal mod setup crashing on wine

This commit is contained in:
Fleeym 2024-05-16 17:23:43 +03:00
parent 9bedf1bacc
commit 2b60027636

View file

@ -59,7 +59,11 @@ Result<> Mod::Impl::setup() {
}
if (!m_resourcesLoaded) {
auto searchPathRoot = dirs::getModRuntimeDir() / m_metadata.getID() / "resources";
CCFileUtils::get()->addSearchPath(searchPathRoot.string().c_str());
// Hi, linux bros!
Loader::get()->queueInMainThread([searchPathRoot]() {
CCFileUtils::get()->addSearchPath(searchPathRoot.string().c_str());
});
const auto binariesDir = searchPathRoot / m_metadata.getID() / "binaries" / PlatformID::toShortString(GEODE_PLATFORM_TARGET);
if (ghc::filesystem::exists(binariesDir))