summaryrefslogtreecommitdiff
path: root/mm/2s2h/SaveManager/Migrations/1.cpp
blob: 5a3d6321190a430a7410134c0c54ee91e85a5b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "2s2h/SaveManager/SaveManager.h"

// To better support future migrations, we always store the `Save` at the `save` key to be consistent across normal
// saves and owl saves
void SaveManager_Migration_1(nlohmann::json& j) {
    bool isOwlSave = j.contains("save");

    if (!isOwlSave) {
        nlohmann::json saveContext;
        saveContext["save"] = j;

        j = saveContext;
    }
}