mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 16:07:52 -05:00
24 lines
698 B
C++
24 lines
698 B
C++
#include <Geode/loader/Loader.hpp>
|
|
|
|
using namespace geode::prelude;
|
|
|
|
#include <Geode/modify/AppDelegate.hpp>
|
|
|
|
struct SaveLoader : Modify<SaveLoader, AppDelegate> {
|
|
void trySaveGame(bool p0) {
|
|
log::info("Saving mod data...");
|
|
log::pushNest();
|
|
|
|
auto begin = std::chrono::high_resolution_clock::now();
|
|
|
|
(void)Loader::get()->saveData();
|
|
|
|
auto end = std::chrono::high_resolution_clock::now();
|
|
auto time = std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count();
|
|
log::info("Took {}s", static_cast<float>(time) / 1000.f);
|
|
|
|
log::popNest();
|
|
|
|
return AppDelegate::trySaveGame(p0);
|
|
}
|
|
};
|