2022-07-30 12:24:03 -04:00
|
|
|
#include <Geode/loader/Loader.hpp>
|
|
|
|
|
|
|
|
USE_GEODE_NAMESPACE();
|
|
|
|
|
2022-10-13 04:31:23 -04:00
|
|
|
#include <codegenned/modify/AppDelegate.hpp>
|
2022-07-30 12:24:03 -04:00
|
|
|
class $modify(AppDelegate) {
|
|
|
|
void trySaveGame() {
|
2022-10-06 17:08:44 -04:00
|
|
|
log::log(Severity::Info, Loader::getInternalMod(), "Saving...");
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
auto r = Loader::get()->saveSettings();
|
|
|
|
if (!r) {
|
2022-10-12 14:31:33 -04:00
|
|
|
log::log(Severity::Error, Loader::getInternalMod(), "{}", r.error());
|
2022-07-30 12:24:03 -04:00
|
|
|
}
|
|
|
|
|
2022-10-06 17:08:44 -04:00
|
|
|
log::log(Severity::Info, Loader::getInternalMod(), "Saved");
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
return AppDelegate::trySaveGame();
|
|
|
|
}
|
|
|
|
};
|