1.5: Fuckin' UE5... #38

Manually merged
williamjcm merged 126 commits from one-point-five into master 2024-07-22 11:06:13 +02:00
2 changed files with 16 additions and 1 deletions
Showing only changes of commit e10a2df906 - Show all commits

View file

@ -35,7 +35,9 @@
namespace mbst { namespace Managers { namespace mbst { namespace Managers {
BackupManager::BackupManager() { BackupManager::BackupManager():
_vfs()
{
refresh(); refresh();
} }
@ -49,6 +51,8 @@ BackupManager::refresh() {
_backups = Containers::Array<Backup>{}; _backups = Containers::Array<Backup>{};
scanSubdir(""_s); scanSubdir(""_s);
_vfs.build(_backups);
} }
Containers::ArrayView<const Backup> Containers::ArrayView<const Backup>
@ -56,6 +60,12 @@ BackupManager::backups() const {
return _backups; return _backups;
} }
const Vfs::VirtualFileSystem<Backup>&
BackupManager::vfs() const
{
return _vfs;
}
bool bool
BackupManager::create(const GameObjects::Profile& profile) { BackupManager::create(const GameObjects::Profile& profile) {
if(!profile.valid()) { if(!profile.valid()) {

View file

@ -25,6 +25,7 @@
#include "Backup.h" #include "Backup.h"
#include "../GameObjects/Profile.h" #include "../GameObjects/Profile.h"
#include "Vfs/VirtualFileSystem.h"
using namespace Corrade; using namespace Corrade;
@ -40,6 +41,8 @@ class BackupManager {
auto backups() const -> Containers::ArrayView<const Backup>; auto backups() const -> Containers::ArrayView<const Backup>;
auto vfs() const -> const Vfs::VirtualFileSystem<Backup>&;
bool create(const GameObjects::Profile& profile); bool create(const GameObjects::Profile& profile);
bool remove(std::size_t index); bool remove(std::size_t index);
bool restore(std::size_t index); bool restore(std::size_t index);
@ -50,6 +53,8 @@ class BackupManager {
Containers::String _lastError; Containers::String _lastError;
Containers::Array<Backup> _backups; Containers::Array<Backup> _backups;
Vfs::VirtualFileSystem<Backup> _vfs;
}; };
}} }}