Use virtual class for different cpu types rather than that hot mess with pointers and shiz

This commit is contained in:
CocoSimone
2023-02-19 22:14:59 +01:00
parent 24eac65357
commit f113db7059
26 changed files with 700 additions and 536 deletions

View File

@@ -65,10 +65,10 @@ Settings::Settings(n64::Core& core) {
switch(core.cpuType) {
case n64::CpuType::Interpreter:
core.cpuInterp = new n64::Interpreter;
core.cpu = std::make_unique<n64::Interpreter>();
break;
case n64::CpuType::Dynarec:
core.cpuDynarec = new n64::JIT::Dynarec;
core.cpu = std::make_unique<n64::Dynarec>();
break;
case n64::CpuType::NONE:
Util::panic("BRUH\n");