December 2069 Update

This commit is contained in:
2024-12-20 17:07:54 +01:00
parent 0857be79df
commit 079f90631c
47 changed files with 706 additions and 372 deletions

View File

@@ -0,0 +1,25 @@
#include "properties.hpp"
#include <gsl/gsl>
#include <ShlObj.h>
namespace utils::properties
{
std::filesystem::path get_appdata_path()
{
PWSTR path;
if (!SUCCEEDED(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &path)))
{
throw std::runtime_error("Failed to read APPDATA path!");
}
auto _ = gsl::finally([&path]
{
CoTaskMemFree(path);
});
static auto appdata = std::filesystem::path(path) / "alterware";
return appdata;
}
}

View File

@@ -0,0 +1,7 @@
#pragma once
#include <filesystem>
namespace utils::properties
{
std::filesystem::path get_appdata_path();
}