1
0
Fork 0
forked from suyu/suyu

Added gpu_refresh_rate config setting for the new interpreter speed hack.

This commit is contained in:
archshift 2014-10-27 18:56:08 -07:00
parent 0783498f57
commit 09e19f9f1e
5 changed files with 7 additions and 11 deletions

View file

@ -58,6 +58,7 @@ void Config::ReadControls() {
void Config::ReadCore() { void Config::ReadCore() {
Settings::values.cpu_core = glfw_config->GetInteger("Core", "cpu_core", Core::CPU_Interpreter); Settings::values.cpu_core = glfw_config->GetInteger("Core", "cpu_core", Core::CPU_Interpreter);
Settings::values.gpu_refresh_rate = glfw_config->GetInteger("Core", "gpu_refresh_rate", 60);
} }
void Config::ReadData() { void Config::ReadData() {

View file

@ -27,7 +27,8 @@ pad_sleft =
pad_sright = pad_sright =
[Core] [Core]
cpu_core = ## 0: Interpreter (default), 1: DynCom Interpreter cpu_core = ## 0: Interpreter (default), 1: FastInterpreter (experimental)
gpu_refresh_rate = ## 60 (default), 1024 or 2048 may work better on the FastInterpreter
[Data Storage] [Data Storage]
use_virtual_sd = use_virtual_sd =

View file

@ -68,12 +68,14 @@ void Config::SaveControls() {
void Config::ReadCore() { void Config::ReadCore() {
qt_config->beginGroup("Core"); qt_config->beginGroup("Core");
Settings::values.cpu_core = qt_config->value("cpu_core", Core::CPU_Interpreter).toInt(); Settings::values.cpu_core = qt_config->value("cpu_core", Core::CPU_Interpreter).toInt();
Settings::values.gpu_refresh_rate = qt_config->value("gpu_refresh_rate", 60).toInt();
qt_config->endGroup(); qt_config->endGroup();
} }
void Config::SaveCore() { void Config::SaveCore() {
qt_config->beginGroup("Core"); qt_config->beginGroup("Core");
qt_config->setValue("cpu_core", Settings::values.cpu_core); qt_config->setValue("cpu_core", Settings::values.cpu_core);
qt_config->setValue("gpu_refresh_rate", Settings::values.gpu_refresh_rate);
qt_config->endGroup(); qt_config->endGroup();
} }

View file

@ -218,16 +218,7 @@ void Update() {
/// Initialize hardware /// Initialize hardware
void Init() { void Init() {
switch (Settings::values.cpu_core) { kFrameCycles = 268123480 / Settings::values.gpu_refresh_rate;
case Core::CPU_FastInterpreter:
kFrameCycles = 268123480 / 2048;
break;
case Core::CPU_Interpreter:
default:
kFrameCycles = 268123480 / 60;
break;
}
kFrameTicks = kFrameCycles / 3; kFrameTicks = kFrameCycles / 3;
g_cur_line = 0; g_cur_line = 0;

View file

@ -28,6 +28,7 @@ struct Values {
// Core // Core
int cpu_core; int cpu_core;
int gpu_refresh_rate;
// Data Storage // Data Storage
bool use_virtual_sd; bool use_virtual_sd;