fix the trysavegame hook

This commit is contained in:
altalk23 2023-01-14 19:31:56 +03:00
parent a15e8cb30f
commit e47a5b4e27
2 changed files with 12 additions and 12 deletions

View file

@ -104,7 +104,7 @@ CPMAddPackage("gh:fmtlib/fmt#9.1.0")
CPMAddPackage("gh:gulrak/filesystem#3e5b930")
# Tulip hook (hooking)
CPMAddPackage("gh:altalk23/TulipHook#d911a46")
CPMAddPackage("gh:altalk23/TulipHook#298d572")
target_link_libraries(${PROJECT_NAME} INTERFACE ghc_filesystem fmt TulipHookInclude)

View file

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