Merge pull request #151 from archshift/dyncom-enabled

Use configuration files to enable or disable the new dyncom interpreter.
This commit is contained in:
bunnei 2014-10-27 22:51:10 -04:00
commit 48f80bb79e
10 changed files with 63 additions and 7 deletions

View file

@ -7,6 +7,7 @@
#include "citra/default_ini.h"
#include "common/file_util.h"
#include "core/settings.h"
#include "core/core.h"
#include "config.h"
@ -55,6 +56,11 @@ void Config::ReadControls() {
Settings::values.pad_sright_key = glfw_config->GetInteger("Controls", "pad_sright", GLFW_KEY_RIGHT);
}
void Config::ReadCore() {
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() {
Settings::values.use_virtual_sd = glfw_config->GetBoolean("Data Storage", "use_virtual_sd", true);
}
@ -62,6 +68,7 @@ void Config::ReadData() {
void Config::Reload() {
LoadINI(glfw_config, glfw_config_loc.c_str(), DefaultINI::glfw_config_file);
ReadControls();
ReadCore();
ReadData();
}

View file

@ -16,6 +16,7 @@ class Config {
bool LoadINI(INIReader* config, const char* location, const std::string& default_contents="", bool retry=true);
void ReadControls();
void ReadCore();
void ReadData();
public:
Config();

View file

@ -26,6 +26,10 @@ pad_sdown =
pad_sleft =
pad_sright =
[Core]
cpu_core = ## 0: Interpreter (default), 1: FastInterpreter (experimental)
gpu_refresh_rate = ## 60 (default), 1024 or 2048 may work better on the FastInterpreter
[Data Storage]
use_virtual_sd =
)";