core: Use shared_ptr for cpu_core.
This commit is contained in:
parent
cec0d4f191
commit
2d4a6883bc
2 changed files with 4 additions and 6 deletions
|
@ -141,14 +141,14 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
||||||
|
|
||||||
switch (Settings::values.cpu_core) {
|
switch (Settings::values.cpu_core) {
|
||||||
case Settings::CpuCore::Unicorn:
|
case Settings::CpuCore::Unicorn:
|
||||||
cpu_core = std::make_unique<ARM_Unicorn>();
|
cpu_core = std::make_shared<ARM_Unicorn>();
|
||||||
break;
|
break;
|
||||||
case Settings::CpuCore::Dynarmic:
|
case Settings::CpuCore::Dynarmic:
|
||||||
default:
|
default:
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
cpu_core = std::make_unique<ARM_Dynarmic>();
|
cpu_core = std::make_shared<ARM_Dynarmic>();
|
||||||
#else
|
#else
|
||||||
cpu_core = std::make_unique<ARM_Unicorn>();
|
cpu_core = std::make_shared<ARM_Unicorn>();
|
||||||
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -140,9 +140,7 @@ private:
|
||||||
/// AppLoader used to load the current executing application
|
/// AppLoader used to load the current executing application
|
||||||
std::unique_ptr<Loader::AppLoader> app_loader;
|
std::unique_ptr<Loader::AppLoader> app_loader;
|
||||||
|
|
||||||
///< ARM11 CPU core
|
std::shared_ptr<ARM_Interface> cpu_core;
|
||||||
std::unique_ptr<ARM_Interface> cpu_core;
|
|
||||||
|
|
||||||
std::unique_ptr<Tegra::GPU> gpu_core;
|
std::unique_ptr<Tegra::GPU> gpu_core;
|
||||||
|
|
||||||
/// When true, signals that a reschedule should happen
|
/// When true, signals that a reschedule should happen
|
||||||
|
|
Loading…
Reference in a new issue