geode/loader/src/hooks/save.cpp
PoweredByPie 5af15fba7c Add geode::prelude to replace USE_GEODE_NAMESPACE()
Don't use macros where not necessary!
This deprecates the old macro by way of a weird alias namespace.
2023-03-10 12:09:48 -08:00

20 lines
440 B
C++

#include <Geode/loader/Loader.hpp>
using namespace geode::prelude;
#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();
}
};