mirror of
https://github.com/geode-sdk/geode.git
synced 2024-12-03 20:51:02 -05:00
5af15fba7c
Don't use macros where not necessary! This deprecates the old macro by way of a weird alias namespace.
20 lines
440 B
C++
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();
|
|
}
|
|
};
|