diff options
author | River City Ransomware <richyateswebdesign@gmail.com> | 2018-01-20 01:36:09 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-20 01:36:09 +0100 |
commit | c8a094e164b77fdae6b4b8bff7f94b703c24c161 (patch) | |
tree | 7f1f70cec7f189c022b9ed5dc03c4996d21e54ca | |
parent | Added CreateSharedMemory & UNIMPLEMENTED() for non existent services. (#113) (diff) | |
download | yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar.gz yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar.bz2 yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar.lz yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar.xz yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.tar.zst yuzu-c8a094e164b77fdae6b4b8bff7f94b703c24c161.zip |
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 19 | ||||
-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 |
4 files changed, 36 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa2154cb1..4b27e0c5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,15 +54,18 @@ function(detect_architecture symbol arch) endif() endfunction() -if (MSVC) - detect_architecture("_M_AMD64" x86_64) - detect_architecture("_M_IX86" x86) - detect_architecture("_M_ARM" ARM) -else() - detect_architecture("__x86_64__" x86_64) - detect_architecture("__i386__" x86) - detect_architecture("__arm__" ARM) +if (NOT ENABLE_GENERIC) + if (MSVC) + detect_architecture("_M_AMD64" x86_64) + detect_architecture("_M_IX86" x86) + detect_architecture("_M_ARM" ARM) + else() + detect_architecture("__x86_64__" x86_64) + detect_architecture("__i386__" x86) + detect_architecture("__arm__" ARM) + endif() endif() + if (NOT DEFINED ARCHITECTURE) set(ARCHITECTURE "GENERIC") set(ARCHITECTURE_GENERIC 1) 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 @@ add_library(core STATIC arm/arm_interface.h - arm/dynarmic/arm_dynarmic.cpp - arm/dynarmic/arm_dynarmic.h arm/unicorn/arm_unicorn.cpp arm/unicorn/arm_unicorn.h core.cpp @@ -178,5 +176,13 @@ add_library(core STATIC create_target_directory_groups(core) -target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core) +target_link_libraries(core PUBLIC common PRIVATE video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn) + +if (ARCHITECTURE_x86_64) + target_sources(core PRIVATE + arm/dynarmic/arm_dynarmic.cpp + arm/dynarmic/arm_dynarmic.h + ) + target_link_libraries(core PRIVATE dynarmic) +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 @@ #include <memory> #include <utility> #include "common/logging/log.h" +#ifdef ARCHITECTURE_x86_64 #include "core/arm/dynarmic/arm_dynarmic.h" +#endif #include "core/arm/unicorn/arm_unicorn.h" #include "core/core.h" #include "core/core_timing.h" @@ -144,7 +146,12 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { break; case Settings::CpuCore::Dynarmic: default: +#ifdef ARCHITECTURE_x86_64 cpu_core = std::make_unique<ARM_Dynarmic>(); +#else + cpu_core = std::make_unique<ARM_Unicorn>(); + LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); +#endif break; } 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 @@ #include "common/assert.h" #include "common/file_util.h" #include "common/scm_rev.h" +#ifdef ARCHITECTURE_x86_64 #include "common/x64/cpu_detect.h" +#endif #include "core/core.h" #include "core/settings.h" #include "core/telemetry_session.h" namespace Core { +#ifdef ARCHITECTURE_x86_64 static const char* CpuVendorToStr(Common::CPUVendor vendor) { switch (vendor) { case Common::CPUVendor::INTEL: @@ -25,6 +28,7 @@ static const char* CpuVendorToStr(Common::CPUVendor vendor) { } UNREACHABLE(); } +#endif static u64 GenerateTelemetryId() { u64 telemetry_id{}; @@ -113,7 +117,8 @@ TelemetrySession::TelemetrySession() { AddField(Telemetry::FieldType::App, "BuildDate", Common::g_build_date); AddField(Telemetry::FieldType::App, "BuildName", Common::g_build_name); - // Log user system information +// Log user system information +#ifdef ARCHITECTURE_x86_64 AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string); AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString", Common::GetCPUCaps().brand_string); @@ -135,6 +140,9 @@ TelemetrySession::TelemetrySession() { Common::GetCPUCaps().sse4_1); AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_SSE42", Common::GetCPUCaps().sse4_2); +#else + AddField(Telemetry::FieldType::UserSystem, "CPU_Model", "Other"); +#endif #ifdef __APPLE__ AddField(Telemetry::FieldType::UserSystem, "OsPlatform", "Apple"); #elif defined(_WIN32) |