mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -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();
|
|
}
|
|
};
|