geode/loader/src/hooks/save.cpp

22 lines
515 B
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#include <Geode/Modify.hpp>
#include <Geode/loader/Loader.hpp>
USE_GEODE_NAMESPACE();
class $modify(AppDelegate) {
void trySaveGame() {
Loader::getInternalMod()->log() << "Saving...";
auto r = Loader::get()->saveSettings();
if (!r) {
Loader::getInternalMod()->logInfo(
r.error(), Severity::Error
);
}
Loader::getInternalMod()->log() << "Saved";
return AppDelegate::trySaveGame();
}
};