AuroraRuntime/Source/SWInfo/AuSWInfo.cpp

51 lines
1.0 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuSWInfo.cpp
Date: 2022-1-25
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "AuSWInfo.hpp"
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "AuSWInfo.NT.hpp"
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
#include "AuSWInfo.Linux.hpp"
#endif
namespace Aurora::SWInfo
{
static const AuString kDefaultStr;
static const OSInformation kDefaultInfo;
static OSInformation const *gInfo = &kDefaultInfo;
static OSInformation gTempInfo;
static void Reset()
{
gInfo = &kDefaultInfo;
}
AUKN_SYM const OSInformation &GetPlatformInfo()
{
return *gInfo;
}
void InitSwInfo()
{
Reset();
#if defined(AURORA_IS_MODERNNT_DERIVED)
InitNTInfo(gTempInfo);
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
InitLinuxInfo(gTempInfo);
#endif
gTempInfo.ePlatform = Build::kCurrentPlatform;
gInfo = &gTempInfo;
}
}