mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Initial commit
This commit is contained in:
20
arm9/source/services/settings/JsonAppSettingsService.h
Normal file
20
arm9/source/services/settings/JsonAppSettingsService.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "IAppSettingsService.h"
|
||||
#include "JsonAppSettingsSerializer.h"
|
||||
|
||||
class JsonAppSettingsService : public IAppSettingsService
|
||||
{
|
||||
JsonAppSettingsSerializer _serializer;
|
||||
AppSettings _appSettings;
|
||||
const char* _filePath;
|
||||
public:
|
||||
explicit JsonAppSettingsService(const char* filePath);
|
||||
|
||||
AppSettings& GetAppSettings() override { return _appSettings; }
|
||||
const AppSettings& GetAppSettings() const override { return _appSettings; }
|
||||
|
||||
void Save() const override
|
||||
{
|
||||
_serializer.Serialize(&_appSettings, _filePath);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user