mirror of
https://github.com/geode-sdk/geode.git
synced 2024-12-11 08:31:13 -05:00
20 lines
431 B
C++
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();
|
|
}
|
|
};
|