Make CPU respect chosen option (JIT, etc)
This commit is contained in:
@@ -3,7 +3,13 @@
|
||||
#include <Scheduler.hpp>
|
||||
|
||||
namespace n64 {
|
||||
Core::Core() : cpu(std::make_unique<Interpreter>(parallel)) {}
|
||||
Core::Core(CPUType cpuType) {
|
||||
switch (cpuType) {
|
||||
case Interpreted: cpu = std::make_unique<Interpreter>(parallel); break;
|
||||
case DynamicRecompiler: cpu = std::make_unique<JIT>(parallel); break;
|
||||
default: Util::panic("Unimplemented CPU type\n");
|
||||
}
|
||||
}
|
||||
|
||||
void Core::Stop() {
|
||||
pause = true;
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
|
||||
namespace n64 {
|
||||
struct Core {
|
||||
explicit Core();
|
||||
enum CPUType {
|
||||
Interpreted,
|
||||
DynamicRecompiler,
|
||||
CachedInterpreter
|
||||
};
|
||||
explicit Core(CPUType);
|
||||
void Stop();
|
||||
void LoadROM(const std::string &);
|
||||
[[nodiscard]] bool LoadTAS(const fs::path &) const;
|
||||
|
||||
Reference in New Issue
Block a user