geode/loader/src/hooks/save.cpp
2022-12-10 19:30:14 +03:00

20 lines
431 B
C++

#include <Geode/loader/Loader.hpp>
USE_GEODE_NAMESPACE();
#include <Geode/modify/AppDelegate.hpp>
struct SaveLoader : Modify<SaveLoader, AppDelegate> {
void trySaveGame() {
log::info("Saving...");
auto r = Loader::get()->saveData();
if (!r) {
log::info("{}", r.unwrapErr());
}
log::info("Saved");
return AppDelegate::trySaveGame();
}
};