Cached interpreter plays Mario 64. Start looking into RSP as well
This commit is contained in:
@@ -2,9 +2,13 @@
|
||||
#include <Options.hpp>
|
||||
#include <log.hpp>
|
||||
#include <imgui.h>
|
||||
#include <Core.hpp>
|
||||
|
||||
CPUSettings::CPUSettings() {
|
||||
if (Options::GetInstance().GetValue<std::string>("cpu", "type") == "jit") {
|
||||
auto selectedCpuType = Options::GetInstance().GetValue<std::string>("cpu", "type");
|
||||
if (selectedCpuType == "jit") {
|
||||
selectedCpuTypeIndex = 2;
|
||||
} else if (selectedCpuType == "cached_interpreter") {
|
||||
selectedCpuTypeIndex = 1;
|
||||
} else {
|
||||
selectedCpuTypeIndex = 0;
|
||||
@@ -12,7 +16,7 @@ CPUSettings::CPUSettings() {
|
||||
}
|
||||
|
||||
void CPUSettings::render() {
|
||||
const char *items[] = {"Interpreter",
|
||||
const char *items[] = {"Interpreter", "Cached Interpreter",
|
||||
#ifdef KAIZEN_JIT_ENABLED
|
||||
"Dynamic Recompiler"
|
||||
#endif
|
||||
@@ -37,8 +41,13 @@ void CPUSettings::render() {
|
||||
if (modified) {
|
||||
if (selectedCpuTypeIndex == 0) {
|
||||
Options::GetInstance().SetValue<std::string>("cpu", "type", "interpreter");
|
||||
n64::Core::GetInstance().cpuType = n64::Core::Interpreted;
|
||||
} else if (selectedCpuTypeIndex == 1) {
|
||||
Options::GetInstance().SetValue<std::string>("cpu", "type", "cached_interpreter");
|
||||
n64::Core::GetInstance().cpuType = n64::Core::CachedInterpreter;
|
||||
} else {
|
||||
Options::GetInstance().SetValue<std::string>("cpu", "type", "jit");
|
||||
n64::Core::GetInstance().cpuType = n64::Core::DynamicRecompiler;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user