From 5d0a1e7efddf234234d54fe97395f6975f8d1a28 Mon Sep 17 00:00:00 2001 From: B3n30 Date: Sat, 19 Aug 2017 19:14:33 +0200 Subject: Added missing parts in libnetwork (#2838) * Network: Set and send the game information over enet Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services. --- src/core/core.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index d08f18623..5332318cf 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -19,6 +19,7 @@ #include "core/loader/loader.h" #include "core/memory_setup.h" #include "core/settings.h" +#include "network/network.h" #include "video_core/video_core.h" namespace Core { @@ -188,6 +189,10 @@ void System::Shutdown() { cpu_core = nullptr; app_loader = nullptr; telemetry_session = nullptr; + if (auto room_member = Network::GetRoomMember().lock()) { + Network::GameInfo game_info{}; + room_member->SendGameInfo(game_info); + } LOG_DEBUG(Core, "Shutdown OK"); } -- cgit v1.2.3 From 6d2734a074f44a24129db850339677d8d7b436aa Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 21 Jul 2017 21:17:57 -0500 Subject: Kernel/Memory: Give each Process its own page table. The loader is in charge of setting the newly created process's page table as the main one during the loading process. --- src/core/core.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index 5332318cf..59b8768e7 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -137,7 +137,6 @@ void System::Reschedule() { } System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { - Memory::InitMemoryMap(); LOG_DEBUG(HW_Memory, "initialized OK"); if (Settings::values.use_cpu_jit) { -- cgit v1.2.3 From 7f48aa8d2580da6b3b83a389e31804e493aba69f Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 26 Sep 2017 18:17:47 -0500 Subject: Loaders: Don't automatically set the current process every time we load an application. The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table. --- src/core/core.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index 59b8768e7..0c7a72987 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -13,6 +13,7 @@ #include "core/core_timing.h" #include "core/gdbstub/gdbstub.h" #include "core/hle/kernel/kernel.h" +#include "core/hle/kernel/process.h" #include "core/hle/kernel/thread.h" #include "core/hle/service/service.h" #include "core/hw/hw.h" @@ -100,7 +101,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file return init_result; } - const Loader::ResultStatus load_result{app_loader->Load()}; + const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)}; if (Loader::ResultStatus::Success != load_result) { LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", load_result); System::Shutdown(); @@ -114,6 +115,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file return ResultStatus::ErrorLoader; } } + Memory::SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table); status = ResultStatus::Success; return status; } @@ -196,4 +198,4 @@ void System::Shutdown() { LOG_DEBUG(Core, "Shutdown OK"); } -} // namespace +} // namespace Core -- cgit v1.2.3