| 1 | #include "filedevice/nin/seadNinSaveFileDeviceNin.h" |
|---|---|
| 2 | |
| 3 | #include <nn/fs/fs_save.h> |
| 4 | |
| 5 | namespace sead |
| 6 | { |
| 7 | NinSaveFileDevice::NinSaveFileDevice(const SafeString& mount) : NinFileDeviceBase("save", mount) {} |
| 8 | |
| 9 | bool NinSaveFileDevice::tryCommit() |
| 10 | { |
| 11 | const auto result = nn::fs::CommitSaveData(path: mMountPoint.cstr()); |
| 12 | mLastError = result; |
| 13 | |
| 14 | if (result.IsSuccess()) |
| 15 | return true; |
| 16 | |
| 17 | SEAD_WARN( |
| 18 | "nn::fs::CommitSaveData failed. module = %d desc = %d inner_value = 0x%08x mount_name=%s", |
| 19 | result.GetModule(), result.GetDescription(), result.GetInnerValueForDebug(), |
| 20 | mMountPoint.cstr()); |
| 21 | return false; |
| 22 | } |
| 23 | } // namespace sead |
| 24 |