diff options
| author | 2018-02-18 14:52:09 -0500 | |
|---|---|---|
| committer | 2018-02-18 14:52:09 -0500 | |
| commit | 2d4a6883bcfa785e990c5dbf3fab9eb73a0ed277 (patch) | |
| tree | f5d63b13728e8b235e8620a015d3f48e34a0904d /src | |
| parent | kernel: Remove unused address_arbiter code. (diff) | |
| download | yuzu-2d4a6883bcfa785e990c5dbf3fab9eb73a0ed277.tar.gz yuzu-2d4a6883bcfa785e990c5dbf3fab9eb73a0ed277.tar.xz yuzu-2d4a6883bcfa785e990c5dbf3fab9eb73a0ed277.zip | |
core: Use shared_ptr for cpu_core.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 6 | ||||
| -rw-r--r-- | src/core/core.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 613a98b4c..89bb2887e 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -141,14 +141,14 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 141 | 141 | ||
| 142 | switch (Settings::values.cpu_core) { | 142 | switch (Settings::values.cpu_core) { |
| 143 | case Settings::CpuCore::Unicorn: | 143 | case Settings::CpuCore::Unicorn: |
| 144 | cpu_core = std::make_unique<ARM_Unicorn>(); | 144 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| 145 | break; | 145 | break; |
| 146 | case Settings::CpuCore::Dynarmic: | 146 | case Settings::CpuCore::Dynarmic: |
| 147 | default: | 147 | default: |
| 148 | #ifdef ARCHITECTURE_x86_64 | 148 | #ifdef ARCHITECTURE_x86_64 |
| 149 | cpu_core = std::make_unique<ARM_Dynarmic>(); | 149 | cpu_core = std::make_shared<ARM_Dynarmic>(); |
| 150 | #else | 150 | #else |
| 151 | cpu_core = std::make_unique<ARM_Unicorn>(); | 151 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| 152 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | 152 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); |
| 153 | #endif | 153 | #endif |
| 154 | break; | 154 | break; |
diff --git a/src/core/core.h b/src/core/core.h index f63cc47cc..e7599e18c 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -140,9 +140,7 @@ private: | |||
| 140 | /// AppLoader used to load the current executing application | 140 | /// AppLoader used to load the current executing application |
| 141 | std::unique_ptr<Loader::AppLoader> app_loader; | 141 | std::unique_ptr<Loader::AppLoader> app_loader; |
| 142 | 142 | ||
| 143 | ///< ARM11 CPU core | 143 | std::shared_ptr<ARM_Interface> cpu_core; |
| 144 | std::unique_ptr<ARM_Interface> cpu_core; | ||
| 145 | |||
| 146 | std::unique_ptr<Tegra::GPU> gpu_core; | 144 | std::unique_ptr<Tegra::GPU> gpu_core; |
| 147 | 145 | ||
| 148 | /// When true, signals that a reschedule should happen | 146 | /// When true, signals that a reschedule should happen |