AuroraRuntime/Source/SWInfo/SWInfo.cpp

51 lines
1.0 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: SWInfo.cpp
Date: 2022-1-25
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "SWInfo.hpp"
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "SWInfo.NT.hpp"
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
#include "SWInfo.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;
}
}