early-access version 2005

This commit is contained in:
pineappleEA
2021-08-20 23:54:30 +02:00
parent 5f0e7d0345
commit bcb0d9cd4f
16 changed files with 511 additions and 349 deletions

View File

@@ -84,6 +84,8 @@ FileSys::StorageId GetStorageIdForFrontendSlot(
} // Anonymous namespace
/*static*/ System System::s_instance;
FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
const std::string& path) {
// To account for split 00+01+etc files.
@@ -423,13 +425,6 @@ struct System::Impl {
System::System() : impl{std::make_unique<Impl>(*this)} {}
System::~System() = default;
void System::InitializeGlobalInstance() {
if (s_instance) {
abort();
}
s_instance = std::unique_ptr<System>(new System);
}
CpuManager& System::GetCpuManager() {
return impl->cpu_manager;
}

View File

@@ -121,14 +121,9 @@ public:
* @returns Reference to the instance of the System singleton class.
*/
[[deprecated("Use of the global system instance is deprecated")]] static System& GetInstance() {
if (!s_instance) {
abort();
}
return *s_instance;
return s_instance;
}
static void InitializeGlobalInstance();
/// Enumeration representing the return values of the System Initialize and Load process.
enum class ResultStatus : u32 {
Success, ///< Succeeded
@@ -398,7 +393,7 @@ private:
struct Impl;
std::unique_ptr<Impl> impl;
inline static std::unique_ptr<System> s_instance{};
static System s_instance;
};
} // namespace Core