diff options
| author | 2017-08-19 19:14:33 +0200 | |
|---|---|---|
| committer | 2017-08-19 11:14:33 -0600 | |
| commit | 5d0a1e7efddf234234d54fe97395f6975f8d1a28 (patch) | |
| tree | cef0c9114f39af64c2971509fb2d0197c73cc155 /src/core | |
| parent | Merge pull request #2881 from MerryMage/dsp-firm-check (diff) | |
| download | yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.gz yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.tar.xz yuzu-5d0a1e7efddf234234d54fe97395f6975f8d1a28.zip | |
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.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/core.cpp | 5 | ||||
| -rw-r--r-- | src/core/loader/ncch.cpp | 8 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 360f407f3..0a6f97e4b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -388,7 +388,7 @@ set(HEADERS | |||
| 388 | 388 | ||
| 389 | create_directory_groups(${SRCS} ${HEADERS}) | 389 | create_directory_groups(${SRCS} ${HEADERS}) |
| 390 | add_library(core STATIC ${SRCS} ${HEADERS}) | 390 | add_library(core STATIC ${SRCS} ${HEADERS}) |
| 391 | target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) | 391 | target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core) |
| 392 | target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) | 392 | target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) |
| 393 | if (ENABLE_WEB_SERVICE) | 393 | if (ENABLE_WEB_SERVICE) |
| 394 | target_link_libraries(core PUBLIC json-headers web_service) | 394 | target_link_libraries(core PUBLIC json-headers web_service) |
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 @@ | |||
| 19 | #include "core/loader/loader.h" | 19 | #include "core/loader/loader.h" |
| 20 | #include "core/memory_setup.h" | 20 | #include "core/memory_setup.h" |
| 21 | #include "core/settings.h" | 21 | #include "core/settings.h" |
| 22 | #include "network/network.h" | ||
| 22 | #include "video_core/video_core.h" | 23 | #include "video_core/video_core.h" |
| 23 | 24 | ||
| 24 | namespace Core { | 25 | namespace Core { |
| @@ -188,6 +189,10 @@ void System::Shutdown() { | |||
| 188 | cpu_core = nullptr; | 189 | cpu_core = nullptr; |
| 189 | app_loader = nullptr; | 190 | app_loader = nullptr; |
| 190 | telemetry_session = nullptr; | 191 | telemetry_session = nullptr; |
| 192 | if (auto room_member = Network::GetRoomMember().lock()) { | ||
| 193 | Network::GameInfo game_info{}; | ||
| 194 | room_member->SendGameInfo(game_info); | ||
| 195 | } | ||
| 191 | 196 | ||
| 192 | LOG_DEBUG(Core, "Shutdown OK"); | 197 | LOG_DEBUG(Core, "Shutdown OK"); |
| 193 | } | 198 | } |
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index c007069a9..7aff7f29b 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include "core/loader/ncch.h" | 20 | #include "core/loader/ncch.h" |
| 21 | #include "core/loader/smdh.h" | 21 | #include "core/loader/smdh.h" |
| 22 | #include "core/memory.h" | 22 | #include "core/memory.h" |
| 23 | #include "network/network.h" | ||
| 23 | 24 | ||
| 24 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 25 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 25 | // Loader namespace | 26 | // Loader namespace |
| @@ -350,6 +351,13 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 350 | 351 | ||
| 351 | Core::Telemetry().AddField(Telemetry::FieldType::Session, "ProgramId", program_id); | 352 | Core::Telemetry().AddField(Telemetry::FieldType::Session, "ProgramId", program_id); |
| 352 | 353 | ||
| 354 | if (auto room_member = Network::GetRoomMember().lock()) { | ||
| 355 | Network::GameInfo game_info; | ||
| 356 | ReadTitle(game_info.name); | ||
| 357 | game_info.id = ncch_header.program_id; | ||
| 358 | room_member->SendGameInfo(game_info); | ||
| 359 | } | ||
| 360 | |||
| 353 | is_loaded = true; // Set state to loaded | 361 | is_loaded = true; // Set state to loaded |
| 354 | 362 | ||
| 355 | result = LoadExec(); // Load the executable into memory for booting | 363 | result = LoadExec(); // Load the executable into memory for booting |