citra-emu
/
citra
Archived
1
0
Fork 0

INI hw/sw renderer toggle

This commit is contained in:
tfarley 2015-05-03 15:34:48 -04:00
parent eca2b71fa8
commit 6d995b1ff6
4 changed files with 12 additions and 0 deletions

View File

@ -70,6 +70,8 @@ void Config::ReadValues() {
Settings::values.frame_skip = glfw_config->GetInteger("Core", "frame_skip", 0); Settings::values.frame_skip = glfw_config->GetInteger("Core", "frame_skip", 0);
// Renderer // Renderer
Settings::values.use_hw_renderer = glfw_config->GetBoolean("Renderer", "use_hw_renderer", false);
Settings::values.bg_red = (float)glfw_config->GetReal("Renderer", "bg_red", 1.0); Settings::values.bg_red = (float)glfw_config->GetReal("Renderer", "bg_red", 1.0);
Settings::values.bg_green = (float)glfw_config->GetReal("Renderer", "bg_green", 1.0); Settings::values.bg_green = (float)glfw_config->GetReal("Renderer", "bg_green", 1.0);
Settings::values.bg_blue = (float)glfw_config->GetReal("Renderer", "bg_blue", 1.0); Settings::values.bg_blue = (float)glfw_config->GetReal("Renderer", "bg_blue", 1.0);

View File

@ -42,6 +42,10 @@ gpu_refresh_rate =
frame_skip = frame_skip =
[Renderer] [Renderer]
# Whether to use software or hardware rendering.
# 0 (default): Software, 1: Hardware
use_hw_renderer =
# The clear color for the renderer. What shows up on the sides of the bottom screen. # The clear color for the renderer. What shows up on the sides of the bottom screen.
# Must be in range of 0.0-1.0. Defaults to 1.0 for all. # Must be in range of 0.0-1.0. Defaults to 1.0 for all.
bg_red = bg_red =

View File

@ -54,6 +54,8 @@ void Config::ReadValues() {
qt_config->endGroup(); qt_config->endGroup();
qt_config->beginGroup("Renderer"); qt_config->beginGroup("Renderer");
Settings::values.use_hw_renderer = qt_config->value("use_hw_renderer", false).toBool();
Settings::values.bg_red = qt_config->value("bg_red", 1.0).toFloat(); Settings::values.bg_red = qt_config->value("bg_red", 1.0).toFloat();
Settings::values.bg_green = qt_config->value("bg_green", 1.0).toFloat(); Settings::values.bg_green = qt_config->value("bg_green", 1.0).toFloat();
Settings::values.bg_blue = qt_config->value("bg_blue", 1.0).toFloat(); Settings::values.bg_blue = qt_config->value("bg_blue", 1.0).toFloat();
@ -105,6 +107,8 @@ void Config::SaveValues() {
qt_config->endGroup(); qt_config->endGroup();
qt_config->beginGroup("Renderer"); qt_config->beginGroup("Renderer");
qt_config->setValue("use_hw_renderer", Settings::values.use_hw_renderer);
// Cast to double because Qt's written float values are not human-readable // Cast to double because Qt's written float values are not human-readable
qt_config->setValue("bg_red", (double)Settings::values.bg_red); qt_config->setValue("bg_red", (double)Settings::values.bg_red);
qt_config->setValue("bg_green", (double)Settings::values.bg_green); qt_config->setValue("bg_green", (double)Settings::values.bg_green);

View File

@ -45,6 +45,8 @@ struct Values {
int region_value; int region_value;
// Renderer // Renderer
bool use_hw_renderer;
float bg_red; float bg_red;
float bg_green; float bg_green;
float bg_blue; float bg_blue;