core: Fixup linux support (#195)

* tls: Implement for linux

* core: Implement memory manager for linux
This commit is contained in:
TheTurtle 2024-06-14 00:58:57 +03:00 committed by GitHub
parent e62690759d
commit 31bd502764
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 184 additions and 88 deletions

View file

@ -40,10 +40,6 @@ Emulator::Emulator() : window{WindowWidth, WindowHeight, controller} {
Common::Log::Initialize();
Common::Log::Start();
// Start discord integration
discord_rpc.init();
discord_rpc.update(Discord::RPCStatus::Idling, "");
// Initialize kernel and library facilities.
Libraries::Kernel::init_pthreads();
Libraries::InitHLELibs(&linker->GetHLESymbols());
@ -52,7 +48,6 @@ Emulator::Emulator() : window{WindowWidth, WindowHeight, controller} {
Emulator::~Emulator() {
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
Config::save(config_dir / "config.toml");
discord_rpc.stop();
}
void Emulator::Run(const std::filesystem::path& file) {
@ -116,7 +111,7 @@ void Emulator::Run(const std::filesystem::path& file) {
std::jthread([this](std::stop_token stop_token) { linker->Execute(); });
// Begin main window loop until the application exits
static constexpr std::chrono::microseconds FlipPeriod{100000};
static constexpr std::chrono::microseconds FlipPeriod{10};
while (window.isOpen()) {
window.waitEvent();
@ -138,4 +133,4 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file) {
}
}
} // namespace Core
} // namespace Core