mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-22 02:45:49 -04:00
Merge branch 'main' of https://github.com/geode-sdk/geode
This commit is contained in:
commit
40a0467bb0
3 changed files with 17 additions and 7 deletions
loader/src
|
@ -605,13 +605,6 @@ void Loader::Impl::refreshModGraph() {
|
|||
|
||||
m_problems.clear();
|
||||
|
||||
if (Loader::get()->getLaunchFlag("safe-mode")) {
|
||||
log::info("Launched in Safe Mode. Any mod loading will be skipped.");
|
||||
m_loadingState = LoadingState::Done;
|
||||
log::popNest();
|
||||
return;
|
||||
}
|
||||
|
||||
m_loadingState = LoadingState::Queue;
|
||||
log::debug("Queueing mods");
|
||||
log::pushNest();
|
||||
|
|
|
@ -357,6 +357,12 @@ bool Mod::Impl::getLaunchFlag(std::string_view const name) const {
|
|||
// Loading, Toggling, Installing
|
||||
|
||||
Result<> Mod::Impl::loadBinary() {
|
||||
if (!this->isInternal() && Loader::get()->getLaunchFlag("safe-mode")) {
|
||||
// pretend to have loaded the mod, so that it still shows up on the mod list properly,
|
||||
// while the user can still toggle/uninstall it
|
||||
m_enabled = true;
|
||||
return Ok();
|
||||
}
|
||||
|
||||
log::debug("Loading binary for mod {}", m_metadata.getID());
|
||||
if (m_enabled)
|
||||
|
|
|
@ -363,6 +363,17 @@ bool ModListLayer::init() {
|
|||
// select first tab
|
||||
this->onTab(nullptr);
|
||||
|
||||
// add safe mode label
|
||||
if (Loader::get()->getLaunchFlag("safe-mode")) {
|
||||
auto* label = CCLabelBMFont::create("Safe Mode Enabled", "bigFont.fnt");
|
||||
label->setPosition(winSize.width / 2.f, 17);
|
||||
label->setScale(0.625f);
|
||||
label->setZOrder(999);
|
||||
this->addChild(label);
|
||||
// reference to windows safe mode
|
||||
bg->setVisible(false);
|
||||
}
|
||||
|
||||
// enable keyboard
|
||||
this->setKeyboardEnabled(true);
|
||||
this->setKeypadEnabled(true);
|
||||
|
|
Loading…
Reference in a new issue