2022-08-01 11:18:03 -04:00
|
|
|
#include <Geode/ui/SceneManager.hpp>
|
|
|
|
|
2023-03-10 14:33:24 -05:00
|
|
|
using namespace geode::prelude;
|
2022-08-01 11:18:03 -04:00
|
|
|
|
2022-10-13 07:00:41 -04:00
|
|
|
#include <Geode/modify/AchievementNotifier.hpp>
|
2022-11-09 13:03:53 -05:00
|
|
|
|
|
|
|
struct SceneSwitch : Modify<SceneSwitch, AchievementNotifier> {
|
2024-01-12 14:18:24 -05:00
|
|
|
static void onModify(const auto& self) {
|
|
|
|
if (!Loader::get()->isForwardCompatMode())
|
|
|
|
return;
|
|
|
|
log::warn("persist disabled in forward compat");
|
|
|
|
for (const auto& [_, hook] : self.m_hooks) {
|
|
|
|
hook->setAutoEnable(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-01 11:18:03 -04:00
|
|
|
void willSwitchToScene(CCScene* scene) {
|
|
|
|
AchievementNotifier::willSwitchToScene(scene);
|
|
|
|
SceneManager::get()->willSwitchToScene(scene);
|
|
|
|
}
|
|
|
|
};
|