Merge branch 'main' into 1.4.0-dev
# Conflicts: # VERSION # loader/src/ui/internal/list/ModListCell.cpp
|
@ -1,5 +1,8 @@
|
|||
# Geode Changelog
|
||||
|
||||
## v1.3.1
|
||||
* Fix TulipHook not relocating RIP relative operands on MacOS (6cad19d)
|
||||
|
||||
## v1.3.0
|
||||
* Completely remove runtime enabling & disabling of mods (d817749)
|
||||
* Patches auto enabling can be disabled (69821f3)
|
||||
|
|
|
@ -174,7 +174,7 @@ class cocos2d::CCDirector {
|
|||
auto convertToGL(cocos2d::CCPoint const&) = mac 0x24a210;
|
||||
auto convertToUI(cocos2d::CCPoint const&) = mac 0x24a340;
|
||||
auto drawScene() = mac 0x249690;
|
||||
auto willSwitchToScene(cocos2d::CCScene* scene);
|
||||
auto willSwitchToScene(cocos2d::CCScene* scene) = mac 0x24a520;
|
||||
auto setOpenGLView(cocos2d::CCEGLView *pobOpenGLView) = mac 0x249be0;
|
||||
auto updateScreenScale(cocos2d::CCSize) = mac 0x249f10;
|
||||
auto setContentScaleFactor(float);
|
||||
|
|
|
@ -86,14 +86,14 @@ namespace geode {
|
|||
ghc::filesystem::path getPackagePath() const;
|
||||
VersionInfo getVersion() const;
|
||||
bool isEnabled() const;
|
||||
bool isLoaded() const;
|
||||
[[deprecated("use isEnabled instead")]] bool isLoaded() const;
|
||||
bool supportsDisabling() const;
|
||||
bool canDisable() const;
|
||||
bool canEnable() const;
|
||||
[[deprecated("always true")]] bool canDisable() const;
|
||||
[[deprecated("always true")]] bool canEnable() const;
|
||||
bool needsEarlyLoad() const;
|
||||
[[deprecated]] bool supportsUnloading() const;
|
||||
[[deprecated("use wasSuccessfullyLoaded instead")]] bool wasSuccesfullyLoaded() const;
|
||||
bool wasSuccessfullyLoaded() const;
|
||||
[[deprecated("always false")]] bool supportsUnloading() const;
|
||||
[[deprecated("use isEnabled instead")]] bool wasSuccesfullyLoaded() const;
|
||||
[[deprecated("use isEnabled instead")]] bool wasSuccessfullyLoaded() const;
|
||||
[[deprecated("use getMetadata instead")]] ModInfo getModInfo() const;
|
||||
ModMetadata getMetadata() const;
|
||||
ghc::filesystem::path getTempDir() const;
|
||||
|
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 12 KiB |
|
@ -16,7 +16,7 @@ struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
|
|||
void updateLoadedModsLabel() {
|
||||
auto allMods = Loader::get()->getAllMods();
|
||||
auto count = std::count_if(allMods.begin(), allMods.end(), [&](auto& item) {
|
||||
return item->isLoaded();
|
||||
return item->isEnabled();
|
||||
});
|
||||
auto str = fmt::format("Geode: Loaded {}/{} mods", count, allMods.size());
|
||||
m_fields->m_loadedModsLabel->setCString(str.c_str());
|
||||
|
|
|
@ -24,14 +24,13 @@ static void printGeodeInfo(std::stringstream& stream) {
|
|||
|
||||
static void printMods(std::stringstream& stream) {
|
||||
auto mods = Loader::get()->getAllMods();
|
||||
if (!mods.size()) {
|
||||
if (mods.empty()) {
|
||||
stream << "<None>\n";
|
||||
}
|
||||
using namespace std::string_view_literals;
|
||||
for (auto& mod : mods) {
|
||||
stream << fmt::format("{:>8} | {:>8} | [{}] {}\n",
|
||||
mod->isLoaded() ? "Loaded"sv : "Unloaded"sv,
|
||||
mod->isEnabled() ? "Enabled"sv : "Disabled"sv,
|
||||
stream << fmt::format("{} | [{}] {}\n",
|
||||
mod->isEnabled() ? "x"sv : " "sv,
|
||||
mod->getVersion().toString(), mod->getID()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <hash/hash.hpp>
|
||||
#include <Geode/utils/JsonValidation.hpp>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
@ -318,19 +320,25 @@ void Index::Impl::downloadIndex() {
|
|||
return;
|
||||
}
|
||||
|
||||
// unzip new index
|
||||
auto unzip = file::Unzip::intoDir(targetFile, targetDir, true)
|
||||
.expect("Unable to unzip new index");
|
||||
if (!unzip) {
|
||||
IndexUpdateEvent(UpdateFailed(unzip.unwrapErr())).post();
|
||||
return;
|
||||
}
|
||||
std::thread([=, this]() {
|
||||
// unzip new index
|
||||
auto unzip = file::Unzip::intoDir(targetFile, targetDir, true)
|
||||
.expect("Unable to unzip new index");
|
||||
if (!unzip) {
|
||||
Loader::get()->queueInMainThread([unzip] {
|
||||
IndexUpdateEvent(UpdateFailed(unzip.unwrapErr())).post();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// remove the directory github adds to the root of the zip
|
||||
(void)flattenGithubRepo(targetDir);
|
||||
// remove the directory github adds to the root of the zip
|
||||
(void)flattenGithubRepo(targetDir);
|
||||
|
||||
// update index
|
||||
this->updateFromLocalTree();
|
||||
Loader::get()->queueInMainThread([this] {
|
||||
// update index
|
||||
this->updateFromLocalTree();
|
||||
});
|
||||
}).detach();
|
||||
})
|
||||
.expect([](std::string const& err) {
|
||||
IndexUpdateEvent(UpdateFailed(fmt::format("Error downloading: {}", err))).post();
|
||||
|
@ -448,7 +456,8 @@ void Index::update(bool force) {
|
|||
// update sources
|
||||
if (force) {
|
||||
m_impl->downloadIndex();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
m_impl->checkForUpdates();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,13 +201,13 @@ Mod* Loader::Impl::getInstalledMod(std::string const& id) const {
|
|||
}
|
||||
|
||||
bool Loader::Impl::isModLoaded(std::string const& id) const {
|
||||
return m_mods.count(id) && m_mods.at(id)->isLoaded();
|
||||
return m_mods.count(id) && m_mods.at(id)->isEnabled();
|
||||
}
|
||||
|
||||
Mod* Loader::Impl::getLoadedMod(std::string const& id) const {
|
||||
if (m_mods.count(id)) {
|
||||
auto mod = m_mods.at(id);
|
||||
if (mod->isLoaded()) {
|
||||
if (mod->isEnabled()) {
|
||||
return mod;
|
||||
}
|
||||
}
|
||||
|
@ -225,8 +225,6 @@ void Loader::Impl::updateModResources(Mod* mod) {
|
|||
if (mod->getMetadata().getSpritesheets().empty())
|
||||
return;
|
||||
|
||||
auto searchPath = mod->getResourcesDir();
|
||||
|
||||
log::debug("Adding resources for {}", mod->getID());
|
||||
|
||||
// add spritesheets
|
||||
|
@ -402,7 +400,7 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
|
|||
log::debug("{} {}", node->getID(), node->getVersion());
|
||||
log::pushNest();
|
||||
|
||||
if (node->isLoaded()) {
|
||||
if (node->isEnabled()) {
|
||||
for (auto const& dep : node->m_impl->m_dependants) {
|
||||
this->loadModGraph(dep, early);
|
||||
}
|
||||
|
@ -438,7 +436,7 @@ void Loader::Impl::findProblems() {
|
|||
log::pushNest();
|
||||
|
||||
for (auto const& dep : mod->getMetadata().getDependencies()) {
|
||||
if (dep.mod && dep.mod->isLoaded() && dep.version.compare(dep.mod->getVersion()))
|
||||
if (dep.mod && dep.mod->isEnabled() && dep.version.compare(dep.mod->getVersion()))
|
||||
continue;
|
||||
switch(dep.importance) {
|
||||
case ModMetadata::Dependency::Importance::Suggested:
|
||||
|
@ -493,19 +491,21 @@ void Loader::Impl::findProblems() {
|
|||
|
||||
Mod* myEpicMod = mod; // clang fix
|
||||
// if the mod is not loaded but there are no problems related to it
|
||||
// if (!mod->isLoaded() && !std::any_of(m_problems.begin(), m_problems.end(), [myEpicMod](auto& item) {
|
||||
// return std::holds_alternative<ModMetadata>(item.cause) &&
|
||||
// std::get<ModMetadata>(item.cause).getID() == myEpicMod->getID() ||
|
||||
// std::holds_alternative<Mod*>(item.cause) &&
|
||||
// std::get<Mod*>(item.cause) == myEpicMod;
|
||||
// })) {
|
||||
// m_problems.push_back({
|
||||
// LoadProblem::Type::Unknown,
|
||||
// mod,
|
||||
// ""
|
||||
// });
|
||||
// log::error("{} failed to load for an unknown reason", id);
|
||||
// }
|
||||
if (!mod->isEnabled() &&
|
||||
Mod::get()->getSavedValue<bool>("should-load-" + mod->getID(), true) &&
|
||||
!std::any_of(m_problems.begin(), m_problems.end(), [myEpicMod](auto& item) {
|
||||
return std::holds_alternative<ModMetadata>(item.cause) &&
|
||||
std::get<ModMetadata>(item.cause).getID() == myEpicMod->getID() ||
|
||||
std::holds_alternative<Mod*>(item.cause) &&
|
||||
std::get<Mod*>(item.cause) == myEpicMod;
|
||||
})) {
|
||||
m_problems.push_back({
|
||||
LoadProblem::Type::Unknown,
|
||||
mod,
|
||||
""
|
||||
});
|
||||
log::error("{} failed to load for an unknown reason", id);
|
||||
}
|
||||
|
||||
log::popNest();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ bool Mod::isEnabled() const {
|
|||
}
|
||||
|
||||
bool Mod::isLoaded() const {
|
||||
return m_impl->isLoaded();
|
||||
return this->isEnabled();
|
||||
}
|
||||
|
||||
bool Mod::supportsDisabling() const {
|
||||
|
@ -55,11 +55,11 @@ bool Mod::supportsDisabling() const {
|
|||
}
|
||||
|
||||
bool Mod::canDisable() const {
|
||||
return m_impl->canDisable();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Mod::canEnable() const {
|
||||
return m_impl->canEnable();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Mod::needsEarlyLoad() const {
|
||||
|
@ -71,10 +71,10 @@ bool Mod::supportsUnloading() const {
|
|||
}
|
||||
|
||||
bool Mod::wasSuccesfullyLoaded() const {
|
||||
return this->wasSuccessfullyLoaded();
|
||||
return this->isEnabled();
|
||||
}
|
||||
bool Mod::wasSuccessfullyLoaded() const {
|
||||
return m_impl->wasSuccessfullyLoaded();
|
||||
return this->isEnabled();
|
||||
}
|
||||
|
||||
ModInfo Mod::getModInfo() const {
|
||||
|
|
|
@ -42,8 +42,9 @@ Result<> Mod::Impl::setup() {
|
|||
if (!loadRes) {
|
||||
log::warn("Unable to load data for \"{}\": {}", m_metadata.getID(), loadRes.unwrapErr());
|
||||
}
|
||||
if (LoaderImpl::get()->m_isSetup) {
|
||||
Loader::get()->updateResources(false);
|
||||
if (!m_resourcesLoaded) {
|
||||
LoaderImpl::get()->updateModResources(m_self);
|
||||
m_resourcesLoaded = true;
|
||||
}
|
||||
|
||||
return Ok();
|
||||
|
@ -112,22 +113,10 @@ bool Mod::Impl::isEnabled() const {
|
|||
return m_enabled;
|
||||
}
|
||||
|
||||
bool Mod::Impl::isLoaded() const {
|
||||
return m_binaryLoaded;
|
||||
}
|
||||
|
||||
bool Mod::Impl::supportsDisabling() const {
|
||||
return m_metadata.getID() != "geode.loader";
|
||||
}
|
||||
|
||||
bool Mod::Impl::canDisable() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Mod::Impl::canEnable() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Mod::Impl::needsEarlyLoad() const {
|
||||
auto deps = m_dependants;
|
||||
return getMetadata().needsEarlyLoad() ||
|
||||
|
@ -136,10 +125,6 @@ bool Mod::Impl::needsEarlyLoad() const {
|
|||
});
|
||||
}
|
||||
|
||||
bool Mod::Impl::wasSuccessfullyLoaded() const {
|
||||
return !this->isEnabled() || this->isLoaded();
|
||||
}
|
||||
|
||||
std::vector<Hook*> Mod::Impl::getHooks() const {
|
||||
return m_hooks;
|
||||
}
|
||||
|
@ -321,7 +306,7 @@ bool Mod::Impl::hasSetting(std::string const& key) const {
|
|||
|
||||
Result<> Mod::Impl::loadBinary() {
|
||||
log::debug("Loading binary for mod {}", m_metadata.getID());
|
||||
if (m_binaryLoaded)
|
||||
if (m_enabled)
|
||||
return Ok();
|
||||
|
||||
LoaderImpl::get()->provideNextMod(m_self);
|
||||
|
@ -333,7 +318,6 @@ Result<> Mod::Impl::loadBinary() {
|
|||
log::error("Failed to load binary for mod {}: {}", m_metadata.getID(), res.unwrapErr());
|
||||
return res;
|
||||
}
|
||||
m_binaryLoaded = true;
|
||||
|
||||
LoaderImpl::get()->releaseNextMod();
|
||||
|
||||
|
@ -630,8 +614,9 @@ ModJson Mod::Impl::getRuntimeInfo() const {
|
|||
for (auto patch : m_patches) {
|
||||
obj["patches"].as_array().push_back(ModJson(patch->getRuntimeInfo()));
|
||||
}
|
||||
// TODO: so which one is it
|
||||
// obj["enabled"] = m_enabled;
|
||||
obj["loaded"] = m_binaryLoaded;
|
||||
obj["loaded"] = m_enabled;
|
||||
obj["temp-dir"] = this->getTempDir();
|
||||
obj["save-dir"] = this->getSaveDir();
|
||||
obj["config-dir"] = this->getConfigDir(false);
|
||||
|
@ -678,7 +663,6 @@ Mod* Loader::Impl::createInternalMod() {
|
|||
else {
|
||||
mod = new Mod(infoRes.unwrap());
|
||||
}
|
||||
mod->m_impl->m_binaryLoaded = true;
|
||||
mod->m_impl->m_enabled = true;
|
||||
m_mods.insert({ mod->getID(), mod });
|
||||
return mod;
|
||||
|
|
|
@ -26,10 +26,6 @@ namespace geode {
|
|||
* Whether the mod is enabled or not
|
||||
*/
|
||||
bool m_enabled = false;
|
||||
/**
|
||||
* Whether the mod binary is loaded or not
|
||||
*/
|
||||
bool m_binaryLoaded = false;
|
||||
/**
|
||||
* Mod temp directory name
|
||||
*/
|
||||
|
@ -66,7 +62,6 @@ namespace geode {
|
|||
bool m_loggingEnabled = true;
|
||||
|
||||
|
||||
|
||||
ModRequestedAction m_requestedAction = ModRequestedAction::None;
|
||||
|
||||
Impl(Mod* self, ModMetadata const& metadata);
|
||||
|
@ -88,12 +83,8 @@ namespace geode {
|
|||
ghc::filesystem::path getPackagePath() const;
|
||||
VersionInfo getVersion() const;
|
||||
bool isEnabled() const;
|
||||
bool isLoaded() const;
|
||||
bool supportsDisabling() const;
|
||||
bool canDisable() const;
|
||||
bool canEnable() const;
|
||||
bool needsEarlyLoad() const;
|
||||
bool wasSuccessfullyLoaded() const;
|
||||
ModMetadata getMetadata() const;
|
||||
ghc::filesystem::path getTempDir() const;
|
||||
ghc::filesystem::path getBinaryPath() const;
|
||||
|
|
|
@ -15,7 +15,7 @@ ModInfo::Impl& ModInfoImpl::getImpl(ModInfo& info) {
|
|||
|
||||
bool Dependency::isResolved() const {
|
||||
return !this->required ||
|
||||
(this->mod && this->mod->isLoaded() && this->mod->isEnabled() &&
|
||||
(this->mod && this->mod->isEnabled() &&
|
||||
this->version.compare(this->mod->getVersion()));
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ ModMetadata::Impl& ModMetadataImpl::getImpl(ModMetadata& info) {
|
|||
|
||||
bool ModMetadata::Dependency::isResolved() const {
|
||||
return this->importance != Importance::Required ||
|
||||
this->mod && this->mod->isLoaded() && this->version.compare(this->mod->getVersion());
|
||||
this->mod && this->mod->isEnabled() && this->version.compare(this->mod->getVersion());
|
||||
}
|
||||
|
||||
bool ModMetadata::Incompatibility::isResolved() const {
|
||||
|
|
|
@ -151,7 +151,7 @@ static Mod* modFromAddress(void const* addr) {
|
|||
}
|
||||
|
||||
for (auto& mod : Loader::get()->getAllMods()) {
|
||||
if (!mod->isLoaded() || !ghc::filesystem::exists(mod->getBinaryPath())) {
|
||||
if (!mod->isEnabled() || !ghc::filesystem::exists(mod->getBinaryPath())) {
|
||||
continue;
|
||||
}
|
||||
if (ghc::filesystem::equivalent(imagePath, mod->getBinaryPath())) {
|
||||
|
|
|
@ -126,7 +126,7 @@ void Loader::Impl::setupIPC() {
|
|||
if (ConnectNamedPipe(pipe, nullptr)) {
|
||||
// log::debug("Got connection, creating thread");
|
||||
std::thread pipeThread(&ipcPipeThread, pipe);
|
||||
SetThreadDescription(pipeThread.native_handle(), L"Geode IPC Pipe");
|
||||
// SetThreadDescription(pipeThread.native_handle(), L"Geode IPC Pipe");
|
||||
pipeThread.detach();
|
||||
}
|
||||
else {
|
||||
|
@ -135,7 +135,7 @@ void Loader::Impl::setupIPC() {
|
|||
}
|
||||
}
|
||||
});
|
||||
SetThreadDescription(ipcThread.native_handle(), L"Geode Main IPC");
|
||||
// SetThreadDescription(ipcThread.native_handle(), L"Geode Main IPC");
|
||||
ipcThread.detach();
|
||||
|
||||
log::debug("IPC set up");
|
||||
|
|
|
@ -54,7 +54,7 @@ void ModListCell::setupInfo(
|
|||
if (inactive && logoSprColor) {
|
||||
logoSprColor->setColor({ 163, 163, 163 });
|
||||
}
|
||||
m_menu->addChild(logoSpr);
|
||||
m_menu->addChild(logoSpr);
|
||||
|
||||
m_columnMenu = CCMenu::create();
|
||||
m_columnMenu->setContentSize({m_width, m_height});
|
||||
|
@ -115,7 +115,7 @@ void ModListCell::setupInfo(
|
|||
m_labelMenu->addChild(versionLabel);
|
||||
|
||||
TagNode* apiLabel = nullptr;
|
||||
|
||||
|
||||
|
||||
if (auto tag = metadata.getVersion().getTag()) {
|
||||
auto tagLabel = TagNode::create(tag.value().toString().c_str());
|
||||
|
@ -302,7 +302,7 @@ bool ModCell::init(
|
|||
m_menu->addChild(restartBtn);
|
||||
}
|
||||
else {
|
||||
if (m_mod->wasSuccessfullyLoaded() && m_mod->getMetadata().getID() != "geode.loader") {
|
||||
if (m_mod->getMetadata().getID() != "geode.loader") {
|
||||
m_enableToggle =
|
||||
CCMenuItemToggler::createWithStandardSprites(this, menu_selector(ModCell::onEnable), .7f);
|
||||
m_menu->addChild(m_enableToggle);
|
||||
|
@ -314,7 +314,7 @@ bool ModCell::init(
|
|||
auto viewBtn = CCMenuItemSpriteExtra::create(viewSpr, this, menu_selector(ModCell::onInfo));
|
||||
m_menu->addChild(viewBtn);
|
||||
|
||||
if (m_mod->wasSuccessfullyLoaded()) {
|
||||
if (m_mod->isEnabled()) {
|
||||
auto latestIndexItem = Index::get()->getMajorItem(
|
||||
mod->getMetadata().getID()
|
||||
);
|
||||
|
|
|
@ -349,7 +349,7 @@ bool ModListLayer::init() {
|
|||
m_tabsGradientNode->ignoreAnchorPointForPosition(true);
|
||||
m_tabsGradientNode->setZOrder(9);
|
||||
m_tabsGradientNode->setInverted(false);
|
||||
m_tabsGradientNode->setAlphaThreshold(0.f);
|
||||
m_tabsGradientNode->setAlphaThreshold(0.7f);
|
||||
|
||||
m_tabsGradientSprite = CCSprite::create("tab-gradient.png"_spr);
|
||||
m_tabsGradientNode->addChild(m_tabsGradientSprite);
|
||||
|
@ -682,7 +682,7 @@ void ModListLayer::onTab(CCObject* pSender) {
|
|||
member->release();
|
||||
}
|
||||
if (isSelected && m_tabsGradientStencil)
|
||||
m_tabsGradientStencil->setPosition(member->m_onButton->convertToWorldSpace({0.f, -1.f}));
|
||||
m_tabsGradientStencil->setPosition(member->m_onButton->convertToWorldSpace({0.f, 0.f}));
|
||||
};
|
||||
|
||||
toggleTab(m_downloadTabBtn);
|
||||
|
|