diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/core/core.cpp | 7 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 10 |
3 files changed, 25 insertions, 4 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8836ddf63..540d290f2 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | add_library(core STATIC | 1 | add_library(core STATIC |
| 2 | arm/arm_interface.h | 2 | arm/arm_interface.h |
| 3 | arm/dynarmic/arm_dynarmic.cpp | ||
| 4 | arm/dynarmic/arm_dynarmic.h | ||
| 5 | arm/unicorn/arm_unicorn.cpp | 3 | arm/unicorn/arm_unicorn.cpp |
| 6 | arm/unicorn/arm_unicorn.h | 4 | arm/unicorn/arm_unicorn.h |
| 7 | core.cpp | 5 | core.cpp |
| @@ -178,5 +176,13 @@ add_library(core STATIC | |||
| 178 | 176 | ||
| 179 | create_target_directory_groups(core) | 177 | create_target_directory_groups(core) |
| 180 | 178 | ||
| 181 | target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core) | 179 | target_link_libraries(core PUBLIC common PRIVATE video_core) |
| 182 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn) | 180 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn) |
| 181 | |||
| 182 | if (ARCHITECTURE_x86_64) | ||
| 183 | target_sources(core PRIVATE | ||
| 184 | arm/dynarmic/arm_dynarmic.cpp | ||
| 185 | arm/dynarmic/arm_dynarmic.h | ||
| 186 | ) | ||
| 187 | target_link_libraries(core PRIVATE dynarmic) | ||
| 188 | endif() | ||
diff --git a/src/core/core.cpp b/src/core/core.cpp index ae1eb2430..0ba44b111 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -5,7 +5,9 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | #include <utility> | 6 | #include <utility> |
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #ifdef ARCHITECTURE_x86_64 | ||
| 8 | #include "core/arm/dynarmic/arm_dynarmic.h" | 9 | #include "core/arm/dynarmic/arm_dynarmic.h" |
| 10 | #endif | ||
| 9 | #include "core/arm/unicorn/arm_unicorn.h" | 11 | #include "core/arm/unicorn/arm_unicorn.h" |
| 10 | #include "core/core.h" | 12 | #include "core/core.h" |
| 11 | #include "core/core_timing.h" | 13 | #include "core/core_timing.h" |
| @@ -144,7 +146,12 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 144 | break; | 146 | break; |
| 145 | case Settings::CpuCore::Dynarmic: | 147 | case Settings::CpuCore::Dynarmic: |
| 146 | default: | 148 | default: |
| 149 | #ifdef ARCHITECTURE_x86_64 | ||
| 147 | cpu_core = std::make_unique<ARM_Dynarmic>(); | 150 | cpu_core = std::make_unique<ARM_Dynarmic>(); |
| 151 | #else | ||
| 152 | cpu_core = std::make_unique<ARM_Unicorn>(); | ||
| 153 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | ||
| 154 | #endif | ||
| 148 | break; | 155 | break; |
| 149 | } | 156 | } |
| 150 | 157 | ||
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index a613889f0..bea05a09b 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -7,13 +7,16 @@ | |||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/file_util.h" | 8 | #include "common/file_util.h" |
| 9 | #include "common/scm_rev.h" | 9 | #include "common/scm_rev.h" |
| 10 | #ifdef ARCHITECTURE_x86_64 | ||
| 10 | #include "common/x64/cpu_detect.h" | 11 | #include "common/x64/cpu_detect.h" |
| 12 | #endif | ||
| 11 | #include "core/core.h" | 13 | #include "core/core.h" |
| 12 | #include "core/settings.h" | 14 | #include "core/settings.h" |
| 13 | #include "core/telemetry_session.h" | 15 | #include "core/telemetry_session.h" |
| 14 | 16 | ||
| 15 | namespace Core { | 17 | namespace Core { |
| 16 | 18 | ||
| 19 | #ifdef ARCHITECTURE_x86_64 | ||
| 17 | static const char* CpuVendorToStr(Common::CPUVendor vendor) { | 20 | static const char* CpuVendorToStr(Common::CPUVendor vendor) { |
| 18 | switch (vendor) { | 21 | switch (vendor) { |
| 19 | case Common::CPUVendor::INTEL: | 22 | case Common::CPUVendor::INTEL: |
| @@ -25,6 +28,7 @@ static const char* CpuVendorToStr(Common::CPUVendor vendor) { | |||
| 25 | } | 28 | } |
| 26 | UNREACHABLE(); | 29 | UNREACHABLE(); |
| 27 | } | 30 | } |
| 31 | #endif | ||
| 28 | 32 | ||
| 29 | static u64 GenerateTelemetryId() { | 33 | static u64 GenerateTelemetryId() { |
| 30 | u64 telemetry_id{}; | 34 | u64 telemetry_id{}; |
| @@ -113,7 +117,8 @@ TelemetrySession::TelemetrySession() { | |||
| 113 | AddField(Telemetry::FieldType::App, "BuildDate", Common::g_build_date); | 117 | AddField(Telemetry::FieldType::App, "BuildDate", Common::g_build_date); |
| 114 | AddField(Telemetry::FieldType::App, "BuildName", Common::g_build_name); | 118 | AddField(Telemetry::FieldType::App, "BuildName", Common::g_build_name); |
| 115 | 119 | ||
| 116 | // Log user system information | 120 | // Log user system information |
| 121 | #ifdef ARCHITECTURE_x86_64 | ||
| 117 | AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string); | 122 | AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string); |
| 118 | AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString", | 123 | AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString", |
| 119 | Common::GetCPUCaps().brand_string); | 124 | Common::GetCPUCaps().brand_string); |
| @@ -135,6 +140,9 @@ TelemetrySession::TelemetrySession() { | |||
| 135 | Common::GetCPUCaps().sse4_1); | 140 | Common::GetCPUCaps().sse4_1); |
| 136 | AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_SSE42", | 141 | AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_SSE42", |
| 137 | Common::GetCPUCaps().sse4_2); | 142 | Common::GetCPUCaps().sse4_2); |
| 143 | #else | ||
| 144 | AddField(Telemetry::FieldType::UserSystem, "CPU_Model", "Other"); | ||
| 145 | #endif | ||
| 138 | #ifdef __APPLE__ | 146 | #ifdef __APPLE__ |
| 139 | AddField(Telemetry::FieldType::UserSystem, "OsPlatform", "Apple"); | 147 | AddField(Telemetry::FieldType::UserSystem, "OsPlatform", "Apple"); |
| 140 | #elif defined(_WIN32) | 148 | #elif defined(_WIN32) |